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
#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;
}
Comments
Leave a comment