SHARE
TWEET

Verificare daca ultima cifra a unui numar este 5

ValerianBenchea Oct 21st, 2019 71 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 n;
  8.     cout<<"n=";
  9.     cin>>n;
  10.     if(n%10==5)
  11.     cout<<"ultima cifra este 5";
  12.     else
  13.     cout<<"ultima cira nu este 5";
  14.  
  15.     return 0;
  16. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top