+ 10
How to compute square root of a number in C# ?
15 odpowiedzi
+ 11
Could you write the full statement of computing the square root?
+ 10
Thank you!
+ 10
Levi Sum The correct code for c# is
Console.WriteLine(Math.Sqrt(25));
+ 9
Aromal Baburaj ummm, we are talking about c# !😊
+ 7
Levi Sum But that is for java, right?
+ 6
double x = 25;
double y = Math.Sqrt(x) ;
+ 1
Math.Sqrt(x)
+ 1
using System;
...
double x = Math.Sqrt(number);
//or
x = System.Math.Sqrt(number);
0
Welcome =)))
0
#include<math.h>
#include <iostream>
Int main()
{
Int x;
x=25;
sqrt(x)
}
- 1
If You don't want to put an int or double of it you can just
System.out.println(math.Sqrt (x));
- 1
Math.Sqrt(number)
System.Math.Sqrt(number)
- 1
System.Math.Sqrt(number);
- 1
Usually Sustem lib automatically integreted in project. So we can write only Math.Sqrt without System
- 1
num**0.5