Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int rok;
- cout << "Napisz w ktorym roku sie urodziles(as): ";
- cin >> rok;
- int wiek = 2018 - rok;
- cout << "Masz " << wiek << " lat" << endl;
- if(wiek >= 18)
- cout << "Jestes juz pelnoletni" << endl;
- else
- cout << "Jeszcze nie jestes pelnoletni" << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement