C Language programs : if condition

If Condition Programs

This section covers programs based on if condition. Here we have programs related to all the syntaxes used for “if condition”.

For all the program we have given proper code and output that we get on the execution of the program.

List of programs are :

  1. C Program to check and print whether the number is +ve or not
  2. C Program to check and print whether the number is -ve or not
  3. C program to check and print whether the number is even or not
  4. C program to check and print whether the number is odd or not
  5. C program to check and print whether the number is a multiple of 7 or  not
  6. C program to check and print whether the number is a multiple of 5 or not
  7. C program to check and print whether the number is a multiple of both 5 and 7 or not
  8. C program to print largest of 2 numbers
  9. C program to print smaller of 2 numbers
  10. C program to check person can vote or not
  11. C program to take input for a number if number<=10 calculate and print its square.
  12. C program to take input for a number if number<=10 calculate and print its cube otherwise print its square.
  13. C program to take a number check and print whether the number is +ve , -ve or zero
  14. C program to take input for three number check and print largest number? (Method :1, 2,3,4)
  15. C program to take input for three number check and print lowest number? (Method :1,2,3,4)
  16. C program to take input for three number check and print the following:
    * Largest number
    * Lowest number
    * difference between largest and lowest number
  17. C program to Take input for 2 numbers and an operator (+,-,*,/) based on the entered operator calculate and print the result?

Programming Solutions @ rajeshshukla

All Programs
C Language Simple Programs
C Language If Condition and Switch Statement Programs
C Language Loop Programs
C Language Conversion Programs
C Language Pattern Programs
C Language Single Dimension Numeric Array programs
C Language Double Dimension Numeric Array Programs
C Language Single Dimension Character Array programs
C Language Pointer Programs
C Language File Handling Programs

Tutorials

Technical Questions

Interview Questions

C Programming
C++ Programming
Class 11 (Python)
Class 12 (Python)
C Language
C++ Programming
Python

C Interview Questions
C++ Interview Questions


Number Of Visitors

0125460