using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication4
{
class Program
{
static void Main(string[] args)
{
int low = 0;
int n,ans,high = 0;
Console.Write("Enter the value of n for the underroot : ");
n=int.Parse(Console.ReadLine());
// high = n;
for(int i=0;i<=n;i++)
{
low += 1;
high += 1;
ans = low * high;
if(ans==n && low==high)
{
Console.Write("the squareroot is : ");
Console.WriteLine(low);
}
else
{
continue;
}
}
Console.ReadLine();
}
}
}
No comments:
Post a Comment