Monday, 14 December 2015

Calculate Maximum and Minimum Number Using if :C Program

#include<stdio.h>

#include<conio.h>

void main()

{

int a,b,c,d,e,max,min;

clrscr();

printf("Enter Five Integer");

scanf("%d%d%d%d%d",&a,&b,&c,&d,&e);

min=max=a;

if(b<min)

min=b;

if(c<min)

min=c;

if(d<min)

min=d;

if(e<min)

min=e;

if(b>max)

max=b;

if(c>max)

max=c;

if(d>max)

max=d;

if(e>max)

max=e;

printf("Maximum Number is : %d\n",max);

printf("Minimum Number is : %d",min);

getch();

}
14 Dec 2015
Next
This is the most recent post.
Previous
Older Post

0 comments:

Post a Comment

:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.