Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Problem 8. Square Root
- //Create a console application that calculates and prints the square root of the number 12345. Find in Internet “how to calculate square root in C#”.
- using System;
- class SquareRoot
- {
- static void Main()
- {
- int number = 12345;
- //Square root of the number
- double squareNumber = Math.Sqrt(number);
- //Print result to console.
- Console.WriteLine("Square root of Number {0} is {1}.",number,squareNumber);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement