Advertisement
Josif_tepe

Untitled

Jan 26th, 2024
811
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6.  
  7. {
  8.     int n;
  9.     cin>>n;
  10.  
  11.     int c=n%4;
  12.  
  13.  
  14.  
  15.  
  16.    if(n%4==0){
  17.     cout<< "0"  <<endl;
  18.  
  19.    }else  if(n%4==1){
  20.     cout<< 3*9 <<endl;
  21.    }
  22.  
  23.    else if(n%4==2)
  24.    {
  25.  
  26.     cout<< 2*9 <<endl;
  27.    }else  if  (n%4==3){
  28.    cout<< 1*9 <<endl;
  29.  
  30.    }
  31.  
  32.  
  33.  
  34. }
  35.  
  36.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement