Nanu bought a new car and for the first time, he wants to go to a temple. Without checking how much petrol is available in the car, he started traveling. After reaching a certain distance, he remembered that he didn't check the petrol level of his car. Then he checks the petrol level and calculates how much distance he must travel to reach the destination. Find whether he can reach the destination with the available petrol. Mileage is also known. Display “Can reach” or “Cannot reach” based on the situation.
Answers
Answer:
#include<iostream>
using namespace std;
int main()
{
int petrol,dist,possibleDist;
float milage;
std::cin>>milage>>petrol>>dist;
possibleDist=milage*petrol;
if(possibleDist >= dist)
std::cout<<"Can reach";
else
std::cout<<"Cannot reach";
return 0;
}
Step-by-step explanation:
Answer:
Nanu has purchased a new vehicle and has expressed a desire to visit a temple. He can reach the temple without first determining how much gas is in the car.
Step-by-step explanation:
A automobile has 30L of gasoline in it. It must move from 0 to 100 kilometres. The car travels in steps, each of which can range in distance from 0 to 6 kilometres. The automobile gets 1 KM/L of mileage. On the route, you can put five random gas stations. The car receives a 20 L refill every time it precisely arrives at the gas station. the automobile in its current location with its fuel level.
Nanu has purchased a new vehicle and has expressed a desire to visit a temple. He began driving without first making sure there was enough gas in the vehicle. He realised he had forgotten to check the fuel level on his automobile after travelling a certain distance. He then checks the gasoline level.
Therefore the answer is “Can reach”.
To learn more about Nanu car refer to:
https://brainly.in/question/4048715
https://brainly.in/question/41396553
#SPJ2