Florence is in Wild tribe ranch. Wild tribe ranch is Adventure Park for adults. Florence is in front of a live cave. The mouth of cave is like a pothole. The guideline of the park mentions the maximum weight of a person who can go through the mouth of the cave. If the candidate’s weight is just same as maximum weight, then the candidate might require to have a rope with them. Florence has to determine whether she will be able to get through the pothole or not. Can you help her?
The input should be the maximum weight and weight of Florence.
Answer
using namespace std;
int main ()
{
int num1,num2;
cin>>num1>>num2;
if (num1>num2)
cout<<"Yes, you can enter.";
else if (num1
cout<<"Sorry, you can't enter";
else if (num1==num2)
cout<<"Yes, you can enter. Kindly use a rope.";
return 0;
}
Answers
Answered by
3
Answer:
#include<iostream>
using namespace std;
int main ()
{
int w1,w2;
cin>>w1>>w2;
if (w1>w2)
{
cout<<"Yes, you can enter.";
}
else if (w1<w2)
{
cout<<"Sorry, you can't enter";
}
else if (w1==w2)
{
cout<<"Yes, you can enter. Kindly use a rope.";
}
return 0;
}
Explanation:
Answered by
0
Answer:
#include<iostream>
int main ()
{
int max_wgt, my_wgt;
std::cin>>max_wgt>>my_wgt;
if (max_wgt>my_wgt)
{
std::cout<<"Yes, you can enter.";
}
else if (max_wgt<my_wgt)
{
std::cout<<"Sorry, you can't enter";
}
else if (max_wgt==my_wgt)
{
std::cout<<"Yes, you can enter. Kindly use a rope.";
}
return 0;
}
Explanation:
Similar questions