Sorry for these easy question, i\'m a beginner. void gett() { string name; doubl
ID: 3646587 • Letter: S
Question
Sorry for these easy question, i'm a beginner.void gett()
{
string name;
double price;
double money;
cout << your name: ";
cin >> name;
cout << name << " ,price of a gram of x?: ";
cin >> price;
cout << name << " ,enter money you have: ";
cin >> budget;
}
int main()
{
gett();
cin.ignore();
cin.get();
return 0;
}
This is what i wrote. Money must be higher than 0 and price of a gram of x must be between 10 and 100.If all the parameters are valid, these function should call a new function that i will wrote later .Otherwise, it will print error messages separately and display that the corresponding execution of the program has finished.No need to use loops.
Explanation / Answer
if(name>0 && 10Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.