Q7 Write a function that receives marks received by a student in 3 subjects and returns the average and percentage of these marks. Call this function from main() and print the results in main().

Program: 128

Write a function in C language that receives marks received by a student in 3 subjects and returns the average and percentage of these marks. Call this function from main() and print the results in main().

How to return multiple values form a single function.

Output:

Enter the marks of subject 1: 34
Enter the marks of subject 2: 63
Enter the marks of subject 3: 62
The Average: 53.00
The Percentage: 53.00%

Lokesh Kumar

Being EASTER SCIENCE's founder, Lokesh Kumar wants to share his knowledge and ideas. His motive is "We assist you to choose the best", He believes in different thinking.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.