If else and Switch practical example - C Programming

Breaking

Home Top Ad

Responsive Ads Here

Thursday, June 1, 2017

If else and Switch practical example

If else and Switch practical example

 If else Program

Write a C program to find maximum between three numbers.using if else

Write a C program to check whether a number is negative, positive or zero. using if else

Write a C program to check whether a number is even or odd.
using if else

Write a C program to input month number and print number of days in that month. using if else

Write a C program to input week number and print week day.
using if else

Write a C program to input month number and print number of days in that month. using if else

Write a C program to input marks of five subjects Physics, Chemistry, Biology, Mathematics and Computer. Calculate percentage and grade according to following:using if else
  1. Percentage >= 90% : Grade A
    Percentage >= 80% : Grade B
    Percentage >= 70% : Grade C
    Percentage >= 60% : Grade D
    Percentage >= 40% : Grade E
    Percentage < 40% : Grade F 

Switch Case Program

Write a C program to print day of week name using switch case.

Write a C program print total number of days in a month using switch case. 

Write a C program to find maximum between two numbers using switch case.


Write a C program to check whether a number is even or odd using switch case. 

Write a C program to create Simple Calculator using switch case.




No comments:

Post a Comment