#include<stdio.h>
#include<stdlib.h>
void line()
{
int i,j;
printf("\n");
for(i=1;i<=42;i++)
printf("=");
}
void header()
{
printf("\n");
printf("Built and Designed by Arslan Malik\n\n www.CworldbyAS.blogspot.com");
printf("\n");
}
int main()
{
line();
header();
line();
int a,b,c,d,e;
printf("\nEnter 'a' integer : ",a);
scanf("%d",&a);
printf("Enter 'b' integer : ",b);
scanf("%d",&b);
printf("Enter 'c' integer : ",c);
scanf("%d",&c);
printf("Enter 'd' integer : ",d);
scanf("%d",&d);
if (a<b && a<c && a<d)
printf("\nSmallest Number is : %d",a);
if (a>b && a>c && a>d)
printf("\nLargest Number is : %d",a);
if (b<a && b<c && b<d)
printf("\nSmallest Number is : %d",b);
if (b>a && b>c && b>d)
printf("\nLargest Number is : %d ",b);
if (c<a && c<b && c<d)
printf("\nSmallest Number is : %d",c);
if (c>a && c>b && c>d)
printf("\nLargest Number is : %d",c);
if (d<a && d<b && d<c)
printf("\nSmallest Number is : %d\n",d);
if (d>a && d>b && d>c)
printf("\nLargest Number is : %d ",d);
getche();
return 0;
}
#include<stdlib.h>
void line()
{
int i,j;
printf("\n");
for(i=1;i<=42;i++)
printf("=");
}
void header()
{
printf("\n");
printf("Built and Designed by Arslan Malik\n\n www.CworldbyAS.blogspot.com");
printf("\n");
}
int main()
{
line();
header();
line();
int a,b,c,d,e;
printf("\nEnter 'a' integer : ",a);
scanf("%d",&a);
printf("Enter 'b' integer : ",b);
scanf("%d",&b);
printf("Enter 'c' integer : ",c);
scanf("%d",&c);
printf("Enter 'd' integer : ",d);
scanf("%d",&d);
if (a<b && a<c && a<d)
printf("\nSmallest Number is : %d",a);
if (a>b && a>c && a>d)
printf("\nLargest Number is : %d",a);
if (b<a && b<c && b<d)
printf("\nSmallest Number is : %d",b);
if (b>a && b>c && b>d)
printf("\nLargest Number is : %d ",b);
if (c<a && c<b && c<d)
printf("\nSmallest Number is : %d",c);
if (c>a && c>b && c>d)
printf("\nLargest Number is : %d",c);
if (d<a && d<b && d<c)
printf("\nSmallest Number is : %d\n",d);
if (d>a && d>b && d>c)
printf("\nLargest Number is : %d ",d);
getche();
return 0;
}
No comments:
Post a Comment