If else programming exercises and solutions in C
- Program to calculate the bill in c++
- CPP program to check that the entered character is small, capital, or a special character
- Program in C++ to check that whether a number is even or odd with flowchart
- 0 is a positive or negative number
- Program to find the positive and negative number
- Write a function to compute the square-root of a given number. If the given number is negative, your function should give an error message.
- Enter Range of numbers and replaced them in C++
- Program to find greater number among three numbers in c++ and C with flowchart
- Armstrong Number Program in C++, C Plus Plus CPP with Flowchart
- ASCII code Program in C++ (C Plus Plus)
- Find the Maximum value program in C++ (C Plus Plus).
- C++ Program to find the maximum between three numbers by using the if-else statement. C++ Program for the maximum number
- C++ Program to take a value from the user as input the basic salary of an employee and calculate its Gross salary according to the following: Basic Salary <= 10000: HRA = 20%, DA = 80%………………………………..Basic Salary <= 20000 : HRA = 25%, DA = 90%………………………………Basic Salary > 20000 : HRA = 30%, DA = 95%.
- C++ Program to find the maximum between two numbers by using the if-else statement. Maximum Number Program
- Using the if-else C++ Program to take a value from the user as input electricity unit charges and calculate total electricity bill according to the given condition: For the first 50 units Rs. 0.50/unit………….For the next 100 units Rs. 0.75/unit…..For the next 100 units Rs. 1.20/unit ……………For unit above 250 Rs. 1.50/unit………An additional surcharge of 20% is added to the bill…….Using if-else.
- Write a program that determines a student’s grade. The program will read three types of scores (quiz, mid-term, and final scores) and determine the grade based on the following rules:if the average score =90% =>grade=A…………………..-if the average score >= 70% and <90% => grade=B……………………-if the average score>=50% and <70% =>grade=C……………………..-if the average score<50% =>grade=F.
- C++ Program to check whether a number is divisible by 5 and 11 or not by using if-else. The number is divisible by 11 or 5 or not
- C++ Program to count the total number of notes in a given amount. Using if-else
- C++ Program to take a value from the user as input the angles of a triangle and check whether the triangle is valid or not by using the if-else statement. Triangle program
- C++ Program to take a value from the user as input all sides of a triangle and check whether the triangle is valid or not. Using if-else.
- C++ Program to check whether the triangle is an equilateral, isosceles or scalene triangle. Using the if-else statement.
- C++ Program to find all the roots of a quadratic equation. Using if-else.
- C++ Program to calculate profit or loss. Using if-else.
- C++ Program to check whether a year is a leap year or not by using an if-else statement. Leap year program
- C++ Program to check whether a character is an alphabet or not. Using if-else.
- C++ Program to take a value from the user as input any alphabet and check whether it is vowel or consonant. Using if-else.
- Using if-else C++ Program to take a value from the to take a value from the user as input marks of five subjects Physics, Chemistry, Biology, Mathematics, and Computer. Calculate percentage and grade according to the following: Percentage >= 90% : Grade A, Percentage >= 80% : Grade B, Percentage >= 70% : Grade C, Percentage >= 60% : Grade D, Percentage >= 40% : Grade E, Percentage < 40% : Grade F, Write this program with the help of if-else statement. Grade and Percentage Program
- C++ Program to take a value from the user as input any character and check whether it is the alphabet, digit or special character. Using if-else.
- C++ Program to check whether a character is an uppercase or lowercase alphabet. Using if-else.
- C++ Program to take value from the user as an input weekday number and print weekday by using if-else statement. Weekday program
- C++ Program to take a value from the user as input the month number and print number of days in that month. Using if-else.\
- C++ Program to check whether a number is a prime or composite number.
- Program to take the hours and minutes as input by the user and the show that whether it is AM or PM using if-else statement
- Write a program to swap the values of two number if values of both variables are not the same using if-else statement
- Program to update even number into its upper nearest odd number. C++ Program to update even to odd
- Write a C program to calculate profit or loss by using if-else. Profit Loss Program
- Write a C++ Program to convert centimeter into meter and kilometer using the if-else statement. Program of centimeter into meter and kilometer
- Write a C++ program to input all sides of a triangle and check whether the triangle is valid or not. Using the switch statement. Triangle Program
-
C PROGRAM TO INPUT THE BASIC SALARY OF AN EMPLOYEE AND CALCULATE ITS GROSS SALARY BY USING THE IF-ELSE STATEMENT – Salary Program
- Write a C++ program in which a user enters a number, and the program will find the Even and odd number. Your program should only accept integers of length 2 or higher and should ask the user to re-enter a value if the value containing total numbers of integers less than 2. The program with goto statement. Even odd program with goto statement.
- C++ program to calculate area of the circle if the radius is greater than 0 using goto statement.
- Write a C++ program to find the roots of a quadratic equation ax2 + bx + c = 0