Jack crosses a street that is ‘X’ meter long in ‘Y’ minutes. Build a pseudocode, to compute the speed in km/hr, given X and Y. (Formula: Speed=Distance/time)Explanation : Suppose the input for X is 500 and Y is 10, then the speed will be calculated asSpeed = 500 / 10 meter/minute = 50 m/mim. But the output should be in km/hr. 1 m/min=0.06 km/hr.Hence 50 m/min = 50 * 0.06 = 3 km/hrHence output should be X/Y * 0.06.
Question
Jack crosses a street that is ‘X’ meter long in ‘Y’ minutes. Build a pseudocode, to compute the speed in km/hr, given X and Y. (Formula: Speed=Distance/time)Explanation : Suppose the input for X is 500 and Y is 10, then the speed will be calculated asSpeed = 500 / 10 meter/minute = 50 m/mim. But the output should be in km/hr. 1 m/min=0.06 km/hr.Hence 50 m/min = 50 * 0.06 = 3 km/hrHence output should be X/Y * 0.06.
Solution
Sure, here is the pseudocode to compute the speed in km/hr given the distance in meters (X) and time in minutes (Y):
START
INPUT X, Y
Speed_in_m_per_min = X / Y
Speed_in_km_per_hr = Speed_in_m_per_min * 0.06
OUTPUT Speed_in_km_per_hr
END
This pseudocode first takes the inputs X and Y. It then calculates the speed in meters per minute by dividing X by Y. After that, it converts the speed to km/hr by multiplying the speed in meters per minute by 0.06. Finally, it outputs the speed in km/hr.
Similar Questions
Write a program that takes the speed (in km/h) and the time (in hours) as input and calculates the distance traveled using the formula: distance = speed * time.Create a class called Distance with speed and time as public attributes. Using a friend function, the program should calculate the total distance.Input format :The input consists of two integers: speed and time separated by a space.
Given that distance = speed x time, write a program that asks for the user for a speed (in mph) and time (in hours) and will calculate and report how far that person can travel going that speedfor the provided time.The program should accept and correctly utilize fractional (i.e. decimal) inputs.
What line of code would print the speed in km/hr if the distance is given in km and the time is given in minutes? (Speed = distance/time)println(distance/(time/60));println(distance/time);println(distance*(time*60));println(distance*time);
Select the correct answerA man crosses a street 600 meters long in 5 minutes. His speed in kilometers per hour is:Options2.67.23.610
1.A person crosses a 600 m long street in 5 minutes. What is his speed in km per hour?3.67.28.410
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.