usingnamespace std; constint NUM = 10; constdouble x = 20.5; intmain() { int a,
ID: 3613562 • Letter: U
Question
usingnamespace std;
constint NUM = 10;
constdouble x = 20.5;
intmain()
{
int a, b;
double z;
char grade;
a = 25;
cout << “a= “<< a << endl;
cin >> a >> b;
cout << endl;
cout << “The numbers youentered are “ << a << “ and “<< b << endl;
z = x + 2 * a – b;
cout << “z = “<< z << endl;
grade = ‘A’;
cout << “Your grade is“ << grade << endl;
a = 2 * NUM + z;
cout << “The value of a= “ << a << endl;
return 0;
}
Explanation / Answer
please rate - thanks the values of the variables are in red next to each line ofcode. The problem is you ask when the input is 20, however the programasks for 2 inputs a and b also your quotes are nogood. - I've fixed some of the code #include using namespace std; const int NUM =10; // NUM=10 const double x =20.5; //x=20.5 int main() { int a, b; double z; char grade; a =25; // a=25 coutRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.