Skip to content

Commit

Permalink
Merge pull request #1 from sanket143/reverse-py
Browse files Browse the repository at this point in the history
Updated Reverse.py
  • Loading branch information
sanket143 authored Oct 4, 2018
2 parents 8f67918 + 85986ef commit 8450160
Show file tree
Hide file tree
Showing 305 changed files with 10,092 additions and 117 deletions.
Binary file added .DS_Store
Binary file not shown.
22 changes: 22 additions & 0 deletions Anup_square.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#include<iostream>
#include<cmath>
using namespace std;

double square(long int i)
{
return (floor(sqrt(i))-sqrt(i));
}
int main()
{
double n;
A : cout<<"Enter integer to be checked : ";
cin>>n;
if(floor(n)-n)
{
cout<<n<<" is not an integer. Try again."<<endl;
goto A;
}
if(square(n)==0) cout<<n<<" is a perfect square."<<endl;
else cout<<n<<" is not a perfect square."<<endl;
return 0;
}
Loading

0 comments on commit 8450160

Please sign in to comment.