fork download
  1. #include <iostream>
  2. using namespace std;
  3. const int NUM = 10;
  4. const double x = 20.5;
  5. int main()
  6. {int a, b;
  7. double z;
  8. char grade;
  9. a = 25;
  10. cout << "a = " << a << endl;
  11. cout <<"Enter two integers: ";
  12. cin >> a >> b;
  13. cout <<endl;
  14. cout << "The numbers you entered are " << a << "and" << b << endl;
  15. z= a++ +2*x - b--;
  16. cout << "z = " << z << endl;
  17. cout << "a = " << a << endl;
  18. cout << "b = " << b << endl;
  19. a=a+1;
  20. b= b- 1;
  21. cout << "a = " << a << endl;
  22. cout << "b = " << b << endl;
  23. z= a++ +2*x - b--;
  24. cout << "z = " << z << endl;
  25. cout << "a = " << a << endl;
  26. cout << "b = " << b << endl;
  27. grade = 'A';
  28. cout << "Your grade is " << grade << endl;
  29. a= 2 * NUM + z;
  30. cout << "The value of a = "<< a << endl;
  31. return 0;
  32. }
  33.  
Success #stdin #stdout 0s 3344KB
stdin
100 200
stdout
a = 25
Enter two integers: 
The numbers you entered are 100and200
z = -59
a = 101
b = 199
a = 102
b = 198
z = -55
a = 103
b = 197
Your grade is A
The value of a = -35