//Tech number 2025 = 20 +25 =45 * 45 =2025
//printing all 4 digit Tech numbers
class tech
{
public static void main(String arg[])
{
for(int i=1000;i<=9999;i++)
{
int cpy,fst,lst;
cpy=i;
lst=cpy%100;
fst=cpy/100;
int sq=(int)Math.pow((fst+lst),2);
if(sq==cpy)
System.out.print(i+"\t");
}
}
}
/*
Output:
2025 3025 9801
Press any key to continue . . .
/*
Comments
Post a Comment