0
Pls help me with this code
#include <iostream> using namespace std; int main() { int a; cout << "Please enter your age \n" ; cin >> a; if ( a <= 12 ) { cout << "Childe\n"; } else { cout << "Teeanager\n"; } if ( a >= 18 ) { cout << "Aldult\n"; } else { cout << "There is something wrong\n"; } return 0; } //when I enter a year older than 18, we write both teenager and child. And every time I start under the year it tells me that something is wrong..... And how can I make it wrong so that it only says when I type letters...
1 Antwort
+ 1
Kmi
Review lesson 13.1 of the C++ tutorial regarding nested else/if statements