Advertisement
Josif_tepe

Untitled

Jan 21st, 2022
671
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int x, y, z;
  8.     cin >> x >> y >> z;
  9.     int broj_na_snolki = 0;
  10.     broj_na_snolki = x + y + z;
  11.     if (broj_na_snolki % 3 == 0 )
  12.     {
  13.         cout << "0" << endl;
  14.     }
  15.     else if (broj_na_snolki % 3 == 2 )
  16.     {
  17.         cout << "1" << endl;
  18.     }
  19.     else if (broj_na_snolki % 3 == 1 )
  20.     {
  21.         cout << "2" << endl;
  22.     }
  23.     return 0;
  24. }
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement