COMP2113
COMP2113_ENGG1340 Programming technologies and Computer programming II [Section 2BC] [2023]
Loading...
Searching...
No Matches
checkpoint3.5.cpp
Go to the documentation of this file.
1#include <iostream>
2using namespace std;
3const int NUM = 10;
4const double X = 20.5;
5int main()
6{
7 int a, b;
8 double p;
9 char grade;
10 a = 23;
11 cout << "a = " << a << endl;
12 cout << "Enter two integers: ";
13 cin >> a >> b;
14 cout << endl;
15 cout << "The numbers you entered are "
16 << a << " and " << b << endl;
17 p = X + 2 * a - b;
18 cout << "p = " << p << endl;
19 grade = 'B';
20 cout << "Your grade is " << grade << endl;
21 a = 2 * NUM + p;
22 cout << "The value of a = " << a << endl;
23 return 0;
24}
const int NUM
const double X
int main()