C Program for Smallest of three numbers

#include<stdio.h>
#include<conio.h>
void main()
{
int n1,n2,n3,small;
printf("Enter 3 Numbers");
scanf("%d%d%d",&n1,&n2,&n3);
small=(n1<n2) ? n1 : n2;
small=(small<n3) ? small : n3;

printf("Smallest of three no's is=%d\n",small);
getch();
}

Comments

Popular posts from this blog

Data types in C Programming

Web Programming