Determining the square of the number of fully

#include <iostream>
using namespace std;

void complete_square ()
{
  int n-, I, High, Low;
  for (I =. 1 ;; I ++) {
    n-= I * I;
    IF (n-<1000)
      Continue;
    IF (n-> 9999)
      BREAK;
    High = n-/ 100; // 4 digits divided by 100 to obtain the first two digits
    low = n% 100; // 4-digit mode 100, after double-digit
    if (high / 10 == high% 10 && low / 10 = 10% Low =)
      the printf ( "% D is a perfect square \ n-!", n-);
  }
}

main int ()
{
  complete_square (); // call the individual function module, so that more concise
  return. 1;
}

Guess you like

Origin www.cnblogs.com/TyranRex/p/12161637.html