Problem Statement:
The drive pulley for a conveyor belt has a diameter D1. The pulley is turned by a motor, while the idler wheel is freely rotating. The idler wheel has a diameter D2. There is no slack in the belt. The belt is moving at a linear speed of VBELT.
Assumptions:
1. The diameters of the drive pulley and idler wheel are specified in centimeters (cm).
2. The speed of the belt is specified in units of meters per second (m/s).
3. The rotation rates are in revolutions per minute (rpm).
Determine the following:
1. What is the rotation rate of the drive pulley?
2. What is the rotation rate of the idler wheel?
Program Requirements:
The requirements are as follows:
1. The program should prompt the user to enter the following information:
o Drive pulley diameter D1 (in cm)
o Idler wheel diameter D2 (in cm)
o Belt speed VBELT (in m/s)
2. The program should calculate and display the following values:
o Drive pulley rotation rate (in rpm)
o Idler wheel rotation rate (in rpm)
3. Display your results to two decimal places.
4. Floating point variables should be declared as type double for best accuracy.
5. Define a macro for the value of π (PI). For consistency, use 3.141592654.
Your program must be ISO C90 compliant.
Sample Output:
The following link shows a sample run of the instructor's version of the program: transcript
$ ./hw2
Enter the diameter D1 of the drive pulley (cm): 30
Enter the diameter D2 of the idler wheel (cm): 5.5
Enter the belt's velocity (m/s): 2
The rotation rate of the drive pulley is 127.32 rpm.
The rotation rate of the idler wheel is 694.49 rpm.
$ ./hw2
Enter the diameter D1 of the drive pulley (cm): 50
Enter the diameter D2 of the idler wheel (cm): 25
Enter the belt's velocity (m/s): 0.5
The rotation rate of the drive pulley is 19.10 rpm.
The rotation rate of the idler wheel is 38.20 rpm.
You are free to make your program's output look as fancy or as plain as you like (within reason).
Notes
- For the scanf()function, use the correct conversion specifier for input variables of type double.
- Be aware that you may need to perform some unit conversions.
- For the Program Design Report, explain in detail the mathematics you used to calculate the required values.
- Good programming style is important. Remember to properly document the program in order to get full credit.