hi everyone im struggling to start my program, please a little help will be apreciated
The university of Guinness charges $3000 per semester for ins-state tuition and $4500 per semester for out-of-state tuition. In addition room and board is $2500 per semester for in-state students and $3500 per semester for out-of-state students. Write a program that prompts the user for their residential status (i.e. in-state or out-of-state) and whether they require room and board (Y or N). The program should then compute and output their bill for that semester.
#include <iostream> //You'll need input and output. Let's use the standard io streams.
int main() { //We need an entree point...
return 0; //Yea, our program ran successfully! We should let the OS know.
}
#include <iostream> //You'll need input and output. Let's use the standard io streams.
#include <cstdlib>
usingnamespace std;
int tuition;
int board; // Variables
char status; // here
int main() //We need an entree point...
{
//then here is the meat of the program
// prompts the user for their residential status (i.e. in-state or out-of-state)
//for this you can use ' cout' and 'cin'
cout<< " what is your residential status" << endl; // this will prompt the user
cin<< status << // this gets the user input and stores it in status
// now you need to do an if statement to see what the user has input and then output what
//the cost is going to be. the logic of the if would be..
//if status is == instate then set tuition and board to the required amount then output the total of them.
// the add an else so if stats is not instat then they are out-of-state then do the same as above but for out-of-state values
return 0; //Yea, our program ran successfully! We should let the OS know.
}
#include <iostream> //You'll need input and output. Let's use the standard io streams.
#include <cstdlib>
usingnamespace std;
// not here!
int main() //We need an entree point...
{
int tuition;
int board;
char status; // here!
...