Answer to Question #242947 in C++ for Urooj

Question #242947

Write a program that has both height restrictions and an age restriction . To gain admission to the ride you need to be 0.6 feet and your age should be 5 or above


1
Expert's answer
2021-09-27T07:18:22-0400
#include <iostream>
using namespace std;




int main(){
	float height;
	int age;
	cout<<"Enter height restrictions: ";
	cin>>height;
	cout<<"Enter age restriction: ";
	cin>>age;


	if(age>=5 && height>0.6){
		cout<<"You have been gained admission to the ride.\n";
	}else{
		cout<<"You have NOT been gained admission to the ride.\n";
	}


	cin>>age;
	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