Advertisement
Guest User

Untitled

a guest
Dec 17th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.49 KB | None | 0 0
  1. //  Задание: F.Количество больших предыдущего  
  2. ///////////////////////////////
  3.  
  4. #include <iostream>
  5. using namespace std;
  6.  
  7. int main()
  8. {      
  9.     int f = 0;
  10.     int a_1 = 0, a_2 = 0;
  11.    
  12.    cin >> a_1;
  13.    
  14.    do
  15.    {
  16.  
  17.         cin >> a_2;  
  18.        
  19.         if(a_2 > a_1)
  20.         {
  21.             f++;
  22.         }
  23.        
  24.         if(a_2 == 0)
  25.         {  
  26.            
  27.             cout << f;
  28.             return 0;  
  29.         }
  30.    
  31.    
  32.    
  33.    }while(1);
  34.    
  35.  
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement