How to cal. Area of a circle in C# pls...I've tried it for hours now, and i still don't get it | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to cal. Area of a circle in C# pls...I've tried it for hours now, and i still don't get it

8th Jul 2022, 2:05 PM
Eugene Zami
Eugene Zami - avatar
2 Answers
+ 3
area = radius * radius * Math.PI
8th Jul 2022, 2:14 PM
Aly Alsayed
Aly Alsayed - avatar
0
Another one to the former would be: int radius; double area = Math.Pow(radius, 2)*Math.PI; Don't forget to make that with the Datatype double or when you want it to be int use: -Math.Ceiling() //Round next highest integer -Math.Floor() //Round to lowest -Math.Round // Round low from 0-5 and hight from 6-9
8th Jul 2022, 2:26 PM
Felix Alcor
Felix Alcor - avatar