What exactly is outputted by the following program Suppose t
Solution
Solution.cpp
#include <iostream>//header file for input output function
#include <iomanip>//header file for set precision // std::setprecision
using namespace std;//it tells the compiler to link std namespace
const int NUM=12;//const variables
const double x=110.5;
int main(int argc,char *argv[])
{//main function
int a,b;//variable declaration
double z;
char grade=\'B\';
a=25;
cout<<fixed<<showpoint;
cout<<setprecision(1);
cout<<\"a = \"<<a<<endl;
cout<<\"Enter two integers \";
cin>>a>>b;//key board inputting
cout<<endl;
cout<<\"the numbers you entered are \"<<a<<\"and \"<<b<<endl;
z=x+2*a%3-b;
cout<<\"z = \"<<z<<endl;
cout<<\"you grade is \"<<grade<<endl;
a=2*NUM+z;
cout<<\"the value of a is \"<<a<<endl;
return 0;
}
output
a = 25
Enter two integers 15 20
the numbers you entered are 15and 20
z = 90.5
you grade is B
the value of a is 114
