Previous Next
0 / 20
Module DEMO-32-89DEMO-C-32

Degrees to Radians Sine

DEMO-C-32 โ€ข Programming in C

Browser-only practice

Problem Statement

Read an angle in degrees, convert it to radians, and print its sine.

Formula: rad = deg * (PI / 180.0).

Target difficulty: Medium

Constraints

None

Input Format

A single floating-point number (degrees).

Output Format

Sine value formatted to 2 decimal places.

Sample Testcases

Submit runs every public testcase in this browser. Results and code never leave this device.

Sample #1
Public sample
0.0
0.00
sin(0.0 deg) = sin(0.00 rad) = 0.00
Sample #2
Public sample
180.0
0.00
sin(180.0 deg) = sin(3.14 rad) = 0.00
Sample #3
Public sample
360.0
-0.00
sin(360.0 deg) = sin(6.28 rad) = -0.00
Sample #4
Public sample
30.0
0.50
sin(30.0 deg) = sin(0.52 rad) = 0.50

Web terminal

C, C++, Java, and Python run locally in a browser VM. No worker or visualizer is used.

Saved in this browser
Editor settings