Advertisement
Guest User

Exercitiul 13

a guest
Dec 11th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.36 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int x;
  8.     cout<< "Aflam ultima cifra a puterii 9^x"<<endl;
  9.     cout << "Introduceti un numar:";
  10.     cin>>x;
  11.     if(x%2==0)
  12.     cout <<"Ultima cifra a lui 9 la puterea "<<x<< " este egala cu 1";
  13.     else
  14.      cout <<"Ultima cifra a lui 9 la puterea "<<x<< " este egala cu 9";
  15.     return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement