Computer Science, asked by abhishekroc6, 9 months ago

Daenerys is very much interested in watching car racing. Once while doing so, this is what she observes that Car 1 is coming so fast. The road on which the car comes is divided into three. There are three roads A, B, and C. Each road is given some number. Before the car reaches the end of the road, she wants to know the road in which the car will travel. Help her in finding in which road the car will travel? INPUT & OUTPUT FORMAT: Input consists of 4 integers. First input corresponds to the number of road A. Second input corresponds to the number of road B. Third input corresponds to the number of road C. Fourth input corresponds to the number of cars. If the car cannot travel on any road, display “No path exist”.

Answers

Answered by nitashachadha84
5

Answer:

Is it a question or answer

Explanation:

Your answer is

C

Answered by venkateshyadla282
0

Answer:

#include<stdio.h>

int main()

{

int road_a,road_b,road_c,no_of_cars;

scanf("%d%d%d%d%d",&road_a,&road_b,&road_c,&no_of_cars);

if((road_a%no_of_cars) == 0) {

  printf("Car 1 goes into road A");

}

else if((road_b%no_of_cars) == 0) {

  printf("Car 1 goes into road B");

}

else if((road_c%no_of_cars) == 0) {

  printf("Car 1 goes into road C");

}

else {

  printf("No path exist");

}

}

Explanation:

Language: C#

Similar questions