CS 159 – HW #01
5 Points Possible
Due: January 23, 2011 at 11:00pm.
Problem:
Given as integers (three in all) an angle in degrees, minutes, and seconds display the value converted
into radians.
Example Execution #1:
Enter number of degrees: 180
Enter number of minutes: 0
Enter number of seconds: 0
Data Entered: 180° 0' 0"
Radians Conversion: 3.1416
Example Execution #2:
Enter number of degrees: 359
Enter number of minutes: 59
Enter number of seconds: 59
Data Entered: 359° 59' 59"
Radians Conversion: 6.2832
Example Execution #3:
Enter number of degrees: 85
Enter number of minutes: 55
Enter number of seconds: 14
Data Entered: 85° 55' 14"
Radians Conversion: 1.4996
Example Execution #4:
Enter number of degrees: 198
Enter number of minutes: 7
Enter number of seconds: 47
Data Entered: 198° 7' 47"
Radians Conversion: 3.4580
Example Execution #5:
Enter number of degrees: 342
Enter number of minutes: 35
Enter number of seconds: 0
Data Entered: 342° 35' 0"
Radians Conversion: 5.9792
Additional Very Important Requirements and Reminders:
•
Accept the input of three integers and produce output formatted
exactly
as seen in the example
executions above.
◦
You may assume the user will always enter meaningful integer data when testing your program.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '08
 CRUM
 Computer program

Click to edit the document details