Logo 
Search:

C Programming Articles

Submit Article
Home » Articles » C Programming » BeginnersRSS Feeds

Program to find smaller or greater numbers using if statement

Posted By: Emily Brown     Category: C Programming     Views: 10258

Write a program to find smaller or greater numbers using if statement.

Code for Program to find smaller or greater numbers using if statement in C Programming

 #include<stdio.h>
 
 main( )
 {
   int c1,c2,c3;
  
 printf("ENTER VALUES OF c1, c2 AND c3");
 scanf("%d%d%d",&c1.&c2,&c3);
 
 if((c1 < c2)&&(c1<c3))
   printf("\n c1 is less than c2 and c3");
 if (!(c1< c2))
   printf("\n c1 is greater than c2");
 if ((c1 < c2)||(c1 < c3))
   printf("\n c1 is less than c2 or c3 or both");
 }
  
Share: 



Emily Brown
Emily Brown author of Program to find smaller or greater numbers using if statement is from London, United Kingdom.
 
View All Articles

Related Articles and Code:


 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!