Tuesday, January 18, 2022

Two Decimal Places in C++

 A simple program that I wrote using C++ programming language to demonstrate two decimal places.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.


My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.








Program Listing

#include <iostream>

#include <iomanip>


using std::string;


  int main() {

 

        float temperature = 123.3567;

        

        std::cout <<"\n";

        std::cout <<"\tTwo Decimal Places in C++";

        std::cout <<"\n\n";

        std::cout << std::fixed;

        std::cout << std::setprecision(2);

        std::cout <<"\tThe temperature is " << temperature <<"\n";

std::cout <<"\n";

        std::cout <<"\tEnd of Program";

        std::cout <<"\n";

        return 0;

  }



No comments:

Post a Comment