#include"stdio.h"
#include"conio.h"
int n,large,small;
void main()
{
printf("Enter a number\n");
scanf("%d",&n);
large=n;
small=n;
while(n != 0)
{
printf("Enter a number\n");
scanf("%d",&n);
if(n>large)
large=n;
else if(n<small)
small=n;
}
printf("Large number is %d \n Small number is %d",large,small);
getch();
}
Home
books and codes
c
c++
code for checking smaller and larger no
code for checking smaller and larger no
0 comments: