employmeent rate survey report

i need advise on implementing a program on c++. The program should ask the user his name, then prompts a message 'good day + name then as the user his age in years. If the user is eighteen or older, the program requests whether or not he has a job. If the user answers yes, the message' congratulations with your job' is printed by tthe program, else the message 'good luck with finding a job' is printed. If the user is younger than eighteen, ask if they are currently attending school, if the answer is 'yes' the message 'good luck choosing a career' is printed, else ask if they are currenlty employed. The program ends/terminates when a name'zzz' is input.
Sounds like a bunch of if/else control statements will do the trick. What have you got so far ?
#include (iostream)
using namespace std;
int main() (
string name;
cout welcome
cout write your name
cin name
cout Good Day+name
int n;
cout write age
cin n;
if (nmore than 18)
cout do u hav a job
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <iostream> //brackets <'header.h'>
#include <string>    //u'll need this for that string object in main
using namespace std;

int main() { //curly bracket
string name; //'string' is declared in string.h
cout << "welcome" << endl; //this is how to use cout. the 'endl' is for the newline char
//and << is the output operator

cin n;
//for the next line do a google search for the 'greater than/more than' operator...
if (nmore than 18)
{
//if n is indeed more than 18 - the code here will execute
}

return 0;//always return at the end of main
}//closing curly bracket 
Last edited on
Topic archived. No new replies allowed.