Question 01
Write a C program that takes an integer input from the user and classifies it as positive, negative, or zero.
Question 02
Write a C program that takes an integer and checks if it is even or odd.
Question 03
Write a C program that takes three integer inputs and determines the largest of the three numbers.
Question 04
Write a C program to solve a quadratic equation of the form ax2 + bx + c = 0. The program should calculate and display the real roots of the equation if they exist. When you ask the user for input, you only need to ask for the coefficients a, b, and c. For example, the equation x2 − 3x + 1 = 0 should be entered as 2 -3 1.
Question 05
Write a C program to calculate the weekly salary of an employee based on the hours worked. The program should ask the user for the number of hours worked and the hourly pay rate. If the number of hours worked is greater than 40, the employee should receive overtime pay for the extra hours at a rate of 1.5 times the regular hourly rate.
Question 06
Write a C program that checks whether a three-digit number is an Armstrong number. An Armstrong number is a number that is equal to the sum of its own digits raised to the power of the number of digits. A three-digit number is Armstrong if it is equal to the sum of its own digits each raised to the power of three. For example, 153 is an Armstrong number because 13 + 53 + 33 = 153.
Question 07
How many three-digit Armstrong numbers are there? Write a program that gives you this answer.