Advertisement
dllbridge

Untitled

Oct 30th, 2022
754
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.53 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int a,
  5.     u,
  6.     f,
  7.     arr[100][3];
  8.    
  9. ///////////////////////////////////////////////////
  10. int main()                                      //
  11. {
  12.    
  13.  cin >> a;
  14.  
  15.  for(int i = 0; i < a; i++)
  16.  {
  17.      cin >> arr[i][i];
  18.      
  19.      f += arr[i][i] %  10;
  20.           arr[i][i] /= 10;
  21.      f += arr[i][i] %  10;
  22.           arr[i][i] /= 10;
  23.      f += arr[i][i] %  10;
  24.      
  25.      cout << f << endl;
  26.      
  27.      if(f >= 2) u++;
  28.      
  29.      f = 0;
  30.  }
  31.  
  32.      cout<< u << endl;
  33.  
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement