heimsventus

using add 1 features ++, etc

Jan 25th, 2017
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.73 KB | None | 0 0
  1. // ConsoleApplication3.cpp : Defines the entry point for the console application.
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "stdafx.h"
  6. #include <iostream>
  7. #include <string>
  8. #include <cmath>
  9. using namespace std;
  10. int main()
  11. {
  12.  
  13.     int test1 = 90, test2 = 10, test3 = 87, test4 = 92;
  14.     int average = (test1 + test2 + test3 + test4) / 4;
  15.     cout << "the average is " << average << endl;
  16.     cout << " Test 1 score is " << test1 << endl;
  17.     test1 = test1 + 1;
  18.     cout << "Test 1 score is " << test1 << endl;
  19.     test1++;
  20.     cout << "Test 2 score is " << test1 << endl;
  21.     test1++;
  22.     cout << "Test 3 score is " << test1 << endl;
  23.  
  24.     int newint = 100;
  25.     cout << "New int =" << newint++ << endl;
  26.     cout << "New int =" << newint << endl;
  27. system("pause");
  28.  
  29. return 0;
Advertisement
Add Comment
Please, Sign In to add comment