Facebook
From Wet Partdridge, 5 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 177
  1. double points;
  2.     start:
  3.     cout << "points:"; cin >> points;
  4.     if (points<=0) return 0;
  5.  
  6.     if(points>=0 && points <=39) // -------------------------------------------------start of the block
  7. {
  8.     cout << "your mark is 2.0" << endl;
  9. }
  10.     else if (points >39 && points <=54)
  11.      {
  12.          cout<< "your mark is 3.0"<< endl;
  13.      }
  14.     else if (points >54 && points <=69)
  15.     {
  16.         cout<< "your mark is 3.5" <<endl;
  17.     }
  18.     else if (points >69 && points <=84)
  19.     {
  20.         cout<< "your mark is 4.0" << endl;
  21.     }
  22.     else if (points >84 && points <=98)
  23.     {
  24.         cout<<"your mark is 4.5" << endl;
  25.     }
  26.     else
  27.     {
  28.         cout <<"your mark is 5.0"<<endl;
  29.     }
  30.  
  31.     goto start; // loop back
  32. //--------------------------------------------------------end of the block
  33.      return 0;