This program contains C code to perform various calculations and character checks:
1. It includes code to calculate a student's grade based on their average marks, check if a character is a vowel or consonant, calculate the sum of digits in a number, and perform basic math operations like addition, subtraction, multiplication and division on user-input numbers.
2. The grade calculation code uses if-else statements to check the average and print the corresponding grade. For character checking, it uses OR operators to check for vowels and prints the result.
3. The digit sum calculation uses a while loop to extract each digit and add it to the running sum. Operations like addition are done using a switch case based on
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
32 views11 pages
C Programs
This program contains C code to perform various calculations and character checks:
1. It includes code to calculate a student's grade based on their average marks, check if a character is a vowel or consonant, calculate the sum of digits in a number, and perform basic math operations like addition, subtraction, multiplication and division on user-input numbers.
2. The grade calculation code uses if-else statements to check the average and print the corresponding grade. For character checking, it uses OR operators to check for vowels and prints the result.
3. The digit sum calculation uses a while loop to extract each digit and add it to the running sum. Operations like addition are done using a switch case based on