Advertisement
Josif_tepe

Untitled

Oct 3rd, 2021
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. #include<iostream>
  2. #include<cmath>
  3. using namespace std;
  4. int main()
  5. {
  6.   int moneti[4];
  7.   int petka=0;
  8.   int glava=0;
  9.   for(int i=0;i<4;i++){
  10.     cin>>moneti[i];
  11.     if(moneti[i]==5){
  12.         petka+=1;
  13.     }
  14.     else glava+=1;
  15.   }
  16.   if(petka<glava){
  17.     cout<<petka<<endl;
  18.   }
  19.   else cout<<glava<<endl;
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement