Untitled
unknown
c_cpp
a year ago
597 B
8
Indexable
#include <iostream>
using namespace std;
int main()
{
int wiek;
cout << "Podaj swoj wiek: ";
cin >> wiek;
if( wiek >= 1 )
{
if( wiek >= 18 )
{
cout << "Jestes pelnoletni. Masz " << wiek << " lat." << endl;
}
else
{
cout << "Nie jestes pelnoletni. Masz " << wiek << " lat." << endl;
cout << "Do 18-stki brakuje ci " << 18 - wiek << " lat. " << endl;
}
}
else
{
cout << "Wiek nie moze byc ujemny ani zerowy!" << endl;
}
return 0;
}
Editor is loading...
Leave a Comment