C# Area of Circle
I am still a beginner and learned a few basics on variables, so I have managed to get the 1st part of the problem but cant find a way to solve all of them at once. Your help will be highly appreciated. xx
Please save your attempt on SL Playground and link here.
Your code should work for each input. You have to read the radius and calculate with it. Plesse try that.
Lawrance Tosa You need to know what this line do. Convert.ToDouble(t); You didn't take input. Don't write Hard Code logic.
https://code.sololearn.com/c8a22A11a199/#cs hope you understand what I did there
I declared variable t and gave it a value of pi * radius, isn't that the input?
I used the Convert.ToDouble because the instructions said convert the inputted value to double
Lawrance Tosa review your previous lesson(s) wich should have teached how to get input from user, as a double value in 'radius' variable... next, use it to compute area by doing PI*radius*radius (squared radius), but avoid using PI as self defined constant number with only 2 digits precision after dot, but rather use the builtin constant available in Math module ;)
Is it also possible to write the code with ()² or ^2? I already know the writing goes like ... (radius * radius) but i am wondering if there is a more easy way of coding it ... Thx ;)