# Generate no.between 32 to 99

Consider the following number
45*45=2025 and
20+25=45.
Write a program to generate no.between 32 to 99 that satisfy the above problem.

#### mahamadalig Profile Answers by mahamadalig

• Apr 17th, 2012

```Code#include<stdio.h>
#include<conio.h>
main()
{
int i,a,r,s,w;
");
for(i=32;i<=99;i++)
{
s=0;
w=i;
a=i*i;
while(a>0)
{
r=a%100;
s=s+r;
a=a/100;
}
if(w==s)
{
printf("                           %d
",w);
}
}
return 0;
} ```

#### Sambuddha Chaudhuri

• Jul 16th, 2015

```Codepublic class sumbtw32and45{
public static void main(String args[]){
//Scanner sc = new Scanner(System.in);
//System.out.println("Enter the number between 32 and 99");
//int i = sc.nextInt();
//if(i >=32 && i <= 99)
int count = 0;
for(int i =32;i<=99;)
{
int j =i * i;
int temp = j %100;
int n = j /100;
int l = temp + n;
if(i == l){
System.out.println(i);
count = count +i;
i++;
}
else
i++;
}
System.out.println("the Sum of these Type of numbers is"+count);
}
}```

#### Sunil Shenoy

• May 16th, 2016

Solved using mod operator.

```Code#include<iostream>
using namespace std;
main()
{
int x,a,b,y,val;
cout<<"valid numbers between 32-99 based on given algorithm is: "<<endl;
for(x=32;x<100;x++)
{
y=x;
val=x*x;
a=val/100;
b=val%100;
if((a+b)==y)
{
cout<<"selected Number is:"<<y<<endl;
cout<<"Square of given value "<<y<<"="<<val<<endl;
cout<<"Quetiont: "<<a<<"
"<<"Reminder: "<<b<<endl;
cout<<a<<"+"<<b<<"="<<y<<endl;
cout<<endl;
cout<<endl;
}
}
}
```

#### anonymous

• Apr 5th, 2017

Basically the same, but in node :)

```Codevar desired = [];
for(var i = 32; i <= 99; i++) {

var value = i * i;
var split1 = parseInt(value / 100);
var split0 = value % 100;
if(split1 + split0 == i) {
desired.push(i);
}
}

console.log("Desired values: " + desired);```

#### gyanendra verma

• Aug 20th, 2017

```Code#include<stdio.h>
void main()
{
int n1,n2,i,temp,b,j,c,check,count=0,a;
clrscr();
printf("enter starting number: ");
scanf("%d",&n1); //n1=32
printf("enter ending number: ");
scanf("%d",&n2);  //n2=99
for(i=n1;i<=n2;i++)
{
temp=i*i;
j=0;
while(temp>0)
{
b=temp%10;
a[j]=b;
temp=temp/10;
j++;
}
check=(a*10)+a+(a*10)+a;
if(check==i)
{
printf("%d ",i);
count++;
}
}
if(count==0)
printf("sorry there is no any number");
getch();
}```  