Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

If you start at 12: y-axis defined as 0 degree point. x-r*sin(theta) y-r*cos(theta) Theta should inc by pi/6 2 Clock coordinates Write a program called

image text in transcribed

If you start at 12: y-axis defined as 0 degree point. x-r*sin(theta) y-r*cos(theta) Theta should inc by pi/6 2 Clock coordinates Write a program called clock_coordinates.c that prompts the user for the radius of an analog clock, and then prints theand y coordinates of the 12 hour marks for that clock. You may assume that the origin for the r and y axes is in the center of the clock. Hint. You will have to include the math.h header and use the sin() and cos() functions to compute the coordinates. Remmber that these functions take in angles expressed in radians, so the constant MPI, which stores the value of and is also defined in math.h, may come in handy. Think about the angle that corresponds to each hour mark, from 1 to 12, and how to derive the coordinates from this angle. 12 Give me the radius! 5 Time: 12 X:0.000000 Y:5.000000 Time: 1 X:2.500000 Y:4.330127 Time: 2 X:4.330127 Y:2.500000 Time: 3 X:5.000000 Y:0.000000 Time: 4 X:4.330127 Y:-2.500000 Time : 5 X: 2 . 500000 Y:-4. 330127 Time : 6 X:0.000000 Y:-5.000000 Time: 7 X:-2.500000 Y:-4.330127 Time: 8 X:-4.330127 Y:-2.500000 Time: 9 X:-5.000000 Y:-0.000000 Time: 10 X:-4.330127 Y:2.500000 Time: 11 X:-2.500000 Y:4.330127 10 Use-Im extension if math.h in terminal Returns doubles -use If 9 4 7

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

State the uses of job description.

Answered: 1 week ago

Question

Explain in detail the different methods of performance appraisal .

Answered: 1 week ago