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

Sine of an Angle

DEMO-C-32 โ€ข Programming in C

Browser-only practice

Problem Statement

Write a program that reads an angle in radians and prints its sine using sin.

Target difficulty: Easy

Constraints

None

Input Format

A single floating-point number (radians).

Output Format

The 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) = 0.00
Sample #2
Public sample
3.14
0.00
sin(3.14) = 0.00
Sample #3
Public sample
6.28
-0.00
sin(6.28) = -0.00
Sample #4
Public sample
0.78
0.70
sin(0.78) = 0.70

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