Advertisement
MeehoweCK

Untitled

Aug 17th, 2018
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. cout << "Podaj swoj rok urodzenia" << endl;
  8. int rok;
  9. cin >> rok; // metoda cin pobiera wartość danej zmiennej od użytkownika (z klawiatury)
  10.  
  11. cout << "Rok podany przez uzytkownika to " << rok << endl;
  12.  
  13. int wiek = 2018-rok;
  14.  
  15. cout << "Masz " << wiek << " lat" << endl;
  16.  
  17. cout << "Pozostalo ci jeszcze "<< 18-wiek << " lat do 18" << endl;
  18.  
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement