COMP2113
COMP2113_ENGG1340 Programming technologies and Computer programming II [Section 2BC] [2023]
Loading...
Searching...
No Matches
checkpoint3.5.cpp File Reference
#include <iostream>
Include dependency graph for checkpoint3.5.cpp:

Go to the source code of this file.

Functions

int main ()
 

Variables

const int NUM = 10
 
const double X = 20.5
 

Function Documentation

◆ main()

int main ( void )

Definition at line 5 of file checkpoint3.5.cpp.

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

References NUM, and X.

Variable Documentation

◆ NUM

const int NUM = 10

Definition at line 3 of file checkpoint3.5.cpp.

Referenced by main().

◆ X

const double X = 20.5

Definition at line 4 of file checkpoint3.5.cpp.

Referenced by main().