I am taking a programming class this semester and I am have trouble wit this homework. I think its called C so I hope this is the right place to post.
Here is the problem:
Problem: Given as integers (three in all) an angle in degrees, minutes, and seconds display the value converted
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
I have this program, but I can't compile it. What did I do wrong?
// Local Declarations
float d; // This will be the degrees of the angle
float m; // This will be the minutes of the angle
float s; // This will be the seconds of the angle
float angle; // This will be the final angle in radians
printf("\nEnter the number of degrees:");
printf("\nEnter the number of minutes:");
printf("\nEnter the number of seconds:");
// Converting to radians
angle =( 3.14159 / 180 ) * (d + (((m * 60) + 30) / 3600) )
// The angle in radians
printf("\nAngle in Radians: %5.5f\n\n", angle);