#include<stdio.h>
#include<conio.h>
main( )
{
int p,q,r,large=0;
clrscr( );
printf("ENTER VALUE FOR P:");
scanf("%d",&p);
printf("ENTER VALUE FOR Q:");
scanf("%d",&q);
printf("ENTER VALUE FOR R:");
scanf("%d",&r);
if (p>large)
large=p ;
if(q>large)
large=q;
if (r>large)
large=r;
printf ("BIGGEST OF ABOVE GIVEN THREE NUMBER IS %d",large);
getch( );
}
Output:-
Run-1
Run-2
Previous Next
#include<conio.h>
main( )
{
int p,q,r,large=0;
clrscr( );
printf("ENTER VALUE FOR P:");
scanf("%d",&p);
printf("ENTER VALUE FOR Q:");
scanf("%d",&q);
printf("ENTER VALUE FOR R:");
scanf("%d",&r);
if (p>large)
large=p ;
if(q>large)
large=q;
if (r>large)
large=r;
printf ("BIGGEST OF ABOVE GIVEN THREE NUMBER IS %d",large);
getch( );
}
Output:-
Run-1
Run-2
Previous Next
Carry on.....
ReplyDelete