Floating Pi

Report a typo

Sam is very good at Math but is new to programming. He's trying to understand floating-point literals by using his favorite constant. However, something went wrong.

Correct his mistakes and make the line compile:

float pi = 3,14159;

Type the whole line. Use float type as well and do not make any additional changes.

Enter a short text
___

Create a free account to access the full topic