+ 10

How to compute square root of a number in C# ?

9th Apr 2019, 3:01 AM
SWETA X
SWETA X - avatar
15 Antworten
+ 11
Could you write the full statement of computing the square root?
9th Apr 2019, 6:03 AM
SWETA X
SWETA X - avatar
+ 10
Thank you!
9th Apr 2019, 6:52 AM
SWETA X
SWETA X - avatar
+ 10
Levi Sum The correct code for c# is Console.WriteLine(Math.Sqrt(25));
12th Apr 2019, 5:35 PM
SWETA X
SWETA X - avatar
+ 9
Aromal Baburaj ummm, we are talking about c# !😊
11th Apr 2019, 8:50 AM
SWETA X
SWETA X - avatar
+ 7
Levi Sum But that is for java, right?
12th Apr 2019, 5:29 PM
SWETA X
SWETA X - avatar
+ 6
double x = 25; double y = Math.Sqrt(x) ;
9th Apr 2019, 6:08 AM
id001x
id001x - avatar
+ 1
Math.Sqrt(x)
9th Apr 2019, 5:34 AM
id001x
id001x - avatar
+ 1
using System; ... double x = Math.Sqrt(number); //or x = System.Math.Sqrt(number);
21st Apr 2019, 10:52 AM
ikolomiko
ikolomiko - avatar
0
Welcome =)))
9th Apr 2019, 6:53 AM
id001x
id001x - avatar
0
#include<math.h> #include <iostream> Int main() { Int x; x=25; sqrt(x) }
11th Apr 2019, 8:48 AM
AROMAL M B
- 1
If You don't want to put an int or double of it you can just System.out.println(math.Sqrt (x));
12th Apr 2019, 5:15 PM
Levi Sum
Levi Sum - avatar
- 1
Math.Sqrt(number) System.Math.Sqrt(number)
12th Apr 2019, 5:32 PM
Levi Sum
Levi Sum - avatar
- 1
System.Math.Sqrt(number);
12th Apr 2019, 5:37 PM
Levi Sum
Levi Sum - avatar
- 1
Usually Sustem lib automatically integreted in project. So we can write only Math.Sqrt without System
12th Apr 2019, 6:02 PM
id001x
id001x - avatar
- 1
num**0.5
14th Apr 2019, 11:23 AM
594 DeDyWkA
594 DeDyWkA - avatar