C Statement if

C examples for Statement:if

Description

Click the following links for the tutorial for Statement and if.

  1. Use nested if statements to see whether you enter an odd or an even number.
  2. Using Blocks of Code in if Statements
  3. If ... else statement
  4. The Basic if Statement
  5. Test user input value with if statement and logical operators
  6. If with else
  7. Operators Used in if Comparisons
  8. Print message if input is less than 5


  9. Use if statement to check user answer to the old yes-or-no question, case insensitive.
  10. Use if statement to check user answer to the old yes-or-no question, case sensitive.
  11. Calculates how old they will be in the current year using if statement
  12. Loops through 10 numbers and tests for odd and prints the even message
  13. Implement the sign function.
  14. Determine if a year is a leap year.
  15. Determine if a number is even or odd with if...else statement
  16. Determine if a number is even or odd.


  17. Calculating the Absolute Value of an Integer.
  18. Evaluate simple expressions of the form "number operator number" with nested if...else statement
  19. Evaluate simple expressions of the form "number operator number"
  20. Checks if two numbers are are evenly divisible.
  21. If Statement
  22. Assigns x to y only if x is greater than y, using if statements.
  23. Demonstrates the use of if statement with else clause
  24. What will the following program print for nesting if into for statement?
  25. Use nested if statements display divisors of a number
  26. What will the following program print when given this input?
  27. Using if else statements, reads input up to #, replaces each period with an exclamation mark