Computer Science, asked by sjeetendrakuma6782, 11 months ago

You went on a tour to Ooty with your friends. As a part of the tour, you went boating with them. For the boat to remain stable, the number of people on one boat is restricted based on the weight of the people. You find that the boatman who is sailing your boat is so much greedy of money. For earning more, he takes too many people to travel in the boat at a time. So you want to check how many people can travel in the boat at a time so that the boat will not drown. Calculate the weight by considering the number of adults and number of children. Assume that an adult weighs 75 kg and children weigh 30 kg each. If the weight is normal, display Boat is stable, else display Boat will drown.

Answers

Answered by manoj2425
7

Answer:

#include<iostream>

using namespace std;

int main()

{

int a,b,c,adult,children,h;

cin>>a>>b>>c;

adult=b*75;

children=c*30;

h=adult+children;

if(h<=a){cout<<"Boat is stable";}

else{cout<<"Boat will drow";}

}

Explanation:

Answered by nidaeamann
6

Answer:

Code written in C language

Explanation:

#include<stdio.h>

int main void

{

Int adult

int children

Int weight_adult

Int weight_child

Int weight_limit

printf("Enter the number of adults in boat");

           scanf("%d", &adult);

printf("Enter the number of children in boat");

           scanf("%d", &children);

weight_adult = adult *75;

weight_child = children *30;

if (weight_limit > (weight_adult + weight_child))

printf (“The boat is stable”)

else

printf (“The boat is not stable”)

return

}

Similar questions