Uploaded August 2026 | Updated September 2026, 1 week ago
Learn how to use if, else if, and else conditional statements in C programming by building a simple grade checking program. In this tutorial, we create an integer marks variable, take exam marks from the user using scanf, and validate the input before checking the grade.
The program checks whether the entered marks are within the valid range of 0 to 100. Invalid values such as 110 or -1 display an invalid input message. For valid marks, multiple else if conditions are used to check grade ranges and display Grade A, B, C, D, or E.
This beginner-friendly C programming example demonstrates user input, scanf, integer variables, input validation, comparison operators, if else if else, and range-based condition checking.
Our Website
LearningLad.com
Social Media
Facebook facebook.com/LearningLad
Twitter twitter.com/LearningLadEdu
Instagram instagram.com/LearningLadOfficial
Learn how to use if, else if, and else conditional statements in C programming by building a simple grade checking program. In this tutorial, we create an integer marks variable, take exam marks from the user using scanf, and validate the input before checking the grade.
The program checks whether the entered marks are within the valid range of 0 to 100. Invalid values such as 110 or -1 display an invalid input message. For valid marks, multiple else if conditions are used to check grade ranges and display Grade A, B, C, D, or E.
This beginner-friendly C programming example demonstrates user input, scanf, integer variables, input validation, comparison operators, if else if else, and range-based condition checking.
Our Website
LearningLad.com
Social Media
Facebook facebook.com/LearningLad
Twitter twitter.com/LearningLadEdu
Instagram instagram.com/LearningLadOfficial










