Trace the following programs and tell what each will display. (Some require a calculator.)
A) (Assume the user enters 38711. Use a calculator.)
#include
using namespace std;
int main()
{
double salary, monthly;
cout <>
cin >> salary;
monthly = static_cast(salary) / 12;
cout <><>
return 0;
}
B) #include
long x, y, z;
x = y = z = 4;
x += 2;
y -= 1;
z *= 3;
cout <><><><><>
C) #include
#define WHO "Columbus"
#define DID "sailed"
#define WHAT "the ocean blue."
const int WHEN = 1492;
<><><>
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here