Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- cout << "Podaj swoj rok urodzenia" << endl;
- int rok;
- cin >> rok; // metoda cin pobiera wartość danej zmiennej od użytkownika (z klawiatury)
- cout << "Rok podany przez uzytkownika to " << rok << endl;
- int wiek = 2018-rok;
- cout << "Masz " << wiek << " lat" << endl;
- cout << "Pozostalo ci jeszcze "<< 18-wiek << " lat do 18" << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement