Wednesday, 26 August 2020

HOW TO FIND SMALLEST OR BIGGEST NUMBER?

THE FOLLOWING PROGRAM EXPLAINS HOW TO FIND SMALL OR BIG NUMBER:

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("Enter any 2 numbers\n");
scanf("%d%d",&a,&b);
if(a>=b)
printf("The result is%d",a);
else
{
if(b>=a)
printf("%d is big",b);
}
printf("Enter any 2 numbers\n");
scanf("%d%d",&a,&b);
if(a<=b)
printf("The result is%d",a);
else
{
if(b<=a)
printf("%d is small",b);
}
getch();
}

No comments:

Post a Comment

C Programming

What is DBMS in brief?

A Database Management System (DBMS) is a software suite designed to efficiently manage, organize, store, manipulate, and retrieve data. It a...