Answer to Question #250557 in C++ for addd

Question #250557

The diameter of a cycle wheel is D. Given that, the cycle travels at an average speed of X km/h,

find the number of revolutions made by the wheel per minute, giving your answer to the nearest whole

number (assume PI = 3.142). Write a C++ function to calculate revolutions per minute.


1
Expert's answer
2021-10-13T00:29:23-0400
#include<iostream>
using namespace std;
int main()
{
	int D,Speed;
	cout<<"Enter the Diameter in cm: ";
	cin>>D;
	double c=3.142*D/100;
	cout<<"Enter the speed in Km/h: ";
	cin>>Speed;
	double x=Speed*5/18;
	double distance=x*1*60;
	int answer=distance/c;
	cout<<"Revolutions per minute is: "<<answer;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS