Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int SquareRoot(int number)
- {
- int check,square;
- int half =number/2;
- bool cond =1;
- int i=2;
- while (i<half&&cond)
- {
- check =number/i;
- if (check==i)
- {square=check;
- cond=0;
- }
- i++;
- }
- int main()
- {
- SquareRoot(141);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement