Advertisement
Guest User

Untitled

a guest
Mar 4th, 2015
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.84 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5.  
  6.  
  7. {
  8.         int MyVar = 200;
  9.         int i = 0
  10.         while (j<>4)
  11.         {
  12.               if (j == 0) {
  13.                   MyVar = MyVar + 5;
  14.                   if (MyVar == 300) {
  15.                       cout << "Zaehler: " << MyVar << endl;
  16.                       j = 1;
  17.                       }
  18.               }
  19.              
  20.                if (j == 1) {
  21.                   MyVar = MyVar - 2.5;
  22.                   if (MyVar == 250) {
  23.                       cout << "Zaehler: " << MyVar << endl;
  24.                       j = 2;
  25.                       }
  26.               }
  27.              
  28.                  if (j == 2) {
  29.                   MyVar = MyVar + 25;
  30.                   if (MyVar == 500) {
  31.                       cout << "Zaehler: " << MyVar << endl;
  32.                       j = 3;
  33.                       }
  34.               }
  35.              
  36.                  if (j == 3) {
  37.                   MyVar = MyVar - 100;
  38.                   if (MyVar == 100) {
  39.                       cout << "Zaehler: " << MyVar << endl;
  40.                       j = 4;
  41.                       }
  42.               }
  43.                  
  44.         }
  45.  
  46.        
  47.  
  48.  
  49.  
  50. }
  51.  
  52. system("pause");
  53. return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement