search
Login

Categories


C Books Guide and List
C++ Books Guide and List
Best Java Books

3.8k questions

4k answers

117 comments

10.7k users

0 votes
3.1k views
asked Geek 15.3k points 14 39 58

1 Answer

0 votes

#include<stdio.h>

#include<conio.h>

void main()

{

int s,d;

clrscr();

printf(“Enter a number:”);

scanf(“%d”, &s);

d=s%10;

if(d= =5)

{

s=s/10;

printf(“\n square=%d%d”, s*s++, d*d);

}

Else

Printf(“\n Invalid number”);

}

Output:

Enter a number: 25

Square =625 

answered Guru 39.1k points 10 21 32
Why we have to divide s by 10

Related questions

0 votes
1 answer 70 views
70 views
asked sara Guru 24.6k points 29 51 76
0 votes
1 answer 25 views
0 votes
1 answer 47 views
47 views
1 2 1 3 2 1 4 3 2 1 4 3 2 1 3 2 1 2 1 1
asked keem Expert 13.2k points 26 40 57
0 votes
1 answer 37 views
...