Advertisement
mihnea101

Untitled

Dec 9th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.     int cif,n;
  6.     ///cifra de control-metoda simpla si usor de inteles
  7.     cin>>n;
  8.     cif=n%9;
  9.     if(cif==0)
  10.         cif=9;
  11.     cout<<cif<<"\n";
  12.     return 0;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement