Problem Solving using C Language

0 of 85 lessons complete (0%)

Conditional Statement

Practice Questions: if-elseif-else

  1. Largest of Three Numbers: Input three numbers and print the largest one.
  2. Character Check: Input a character and check whether it is a vowel, consonant, digit, or special character.
  3. Grade Calculator: Input marks and assign grades:
90–100 → A  
80–89  → B  
70–79  → C  
60–69  → D  
<60    → F

4. Triangle Validity: Input three angles of a triangle and check if the triangle is valid (sum = 180°).

5. Profit or Loss: Input cost price (CP) and selling price (SP), and print whether there is a profit, loss, or no profit/loss.

    6. Absolute Value: Input any number and print its absolute value (without using built-in functions).