adsense

Hii, welcome to my site. My name is Om prakash kartik. This blog helps you to learn programming languages concepts.

Write a program in C to find smallest of given three numbers .

 Write a program in C to find smallest of given three numbers .

#include<stdio.h>
#include<conio.h>
 void main()
  {
  int a,b,c,sam; 
    clrscr();
    printf("Enter threee numbers:-");
  scanf("%d%d%d",&a,&b,&c);
  if(a<b&&a<c)
     sam=a;
  else if(b<c)
     sam=b;
  else
     sam=c;
     printf("%d is samllest no.",sam);
     getch();
  }

Output:

 


 

Post a Comment

0 Comments