0
How do i solve this question for C#? This is what i wrote but as you can see, it doesn't work (I'm new to C# i need explanation)
4 odpowiedzi
+ 2
As stated the WriteLiene cannot be assigned to a variable, its value is void.
Provide a numeric data type for your num variable, and assign it to with r*r
When using int, this will look like this:
int num = r*r;
+ 1
MrFruitL
You have defined radius and taking input in another variable?
where did you define num?
Formula for area is (pi * r * r) and what are you doing doens't make sense.
What is the reason to assign Console.WriteLine(r*r) in num?
Take some time to understand concepts otherwise you will not learn anything.
0
MrFruitL
Console.WriteLine() is use to print so you can't assign it in any variable.
Take some time to understand concepts.
0
Hmmm alright thanks, i learned C# 5 months ago and stopped. I guess i got pretty self confident. Thanks