Professional Documents
Culture Documents
Ap1.
Create a program for automatic grading by reading from the keyboard the number of point
(number of points ranges from 10 to 100). Grading is given from the following flowchart:
Ap2.
Read two real numbers (double) from the keyboard that represents Cartesian coordinates x0
and y0 of a point P calculate polar coordinates. Display results r and ( in degrees).
r x 2 y 2
y x1 r cos( )
0 0
y0 y r sin( )
arctan 1
y0 P(x0,y0) x0
x0 x
Indications:
For validation, check the Cartesian coordinates x1 and y1 calculated from r and values are
the same with x0 and y0 (use the absolute or relative error)