Programming Problems!!!
Thursday, March 13, 2014
UVa Solution 10110 : Light, more light
#include<cstdio>
#include<cmath>
#include<iostream>
using namespace std;
int main()
{
long long n, a, b;
while(scanf("%lld",&n)==1)
{
if(n==0)
{
break;
}
a=sqrt(n);
b=a*a;
if(b==n)
{
printf("yes\n");
}
else
{
printf("no\n");
}
}
return 0;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Compare equality of two string in C
#include <stdio.h> #include<string.h> int main() { char* country = "Bangladesh"; char* country2; ...
No comments:
Post a Comment