steps :-
1 . ask for a input.
2 . calculate and store the square in another variable.
3 . calculate the number of digits in the input.
4 . find the last two digit of square number .
5 . compare the last two digit number with the input number and give the result.
If anyone is intrested in c programming please drop a comment. we can grow together .
output :
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
include
int main()
{
int a , b , q , s=0 ,i=0 , r;
printf("enter the number");
scanf("%d" , &a);
b=a*a;
q=a;
// calculating number of digits in a //
//finding last two digits of b in reverse order //
for(i;i>0;i--)
{
r=q%10;
s=s*10+r;
q=q/10;
}
q=s;
s=0;
//finding digits in correct order //
// now comparing with input //
}
This is the solution in c.
steps :-
1 . ask for a input.
2 . calculate and store the square in another variable.
3 . calculate the number of digits in the input.
4 . find the last two digit of square number .
5 . compare the last two digit number with the input number and give the result.
output :