Answer to Question #325244 in C++ for Batman

Question #325244

write a program that prompts the user to enter the age of a customer.if the age is younger than 15 then ask the user to enter the name of the customer and notify them by name that they qualify a free toy


1
Expert's answer
2022-04-07T04:05:08-0400
#include <iostream>
#include <string>
 
using namespace std;

int main()
{
    int age;
    string name;
    cout<<"Age: ";
    cin>>age;
    if(age<15){
        cout<<"Name: ";
        cin>>name;
        cout<<name<< "! You are qualify to a free toy."<<endl;
    }
    return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS