Advertisement
heranchris0430

Online Jugde Beginner-B860

Apr 19th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1. // Online Jugde Beginner-B860.cpp : 定義主控台應用程式的進入點。
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include <iostream>
  6. #include <stdlib.h>
  7.  
  8. using namespace std;
  9.  
  10. int main()
  11. {
  12.     int ka = 0, we = 0, ca = 0 ;
  13.     while (1) {
  14.  
  15.         ka = 0;
  16.         we = 0;
  17.         ca = 0;
  18.  
  19.         cin >> ca >> we;
  20.  
  21.         ca += we;
  22.  
  23.         END:
  24.  
  25.         if (ca > 11) {
  26.             ca -= 12;
  27.             ka++;
  28.             ca += ka;
  29.             goto END;
  30.         }
  31.  
  32.         cout << ka << endl;
  33.  
  34.         system("PAUSE");
  35.         system("CLS");
  36.     }
  37.     return 0;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement