Turn Desktop View Off
You are here:   HomeC Programming (Pratical)C Program Using Structure to Calculate Marks of 10 Students in Different Subjects
by Dinesh Thakur Category: C Programming (Pratical)

In this program integer type variables are created which contained data of five subjects that are given. Then some variables of floating type data type also created for required data containing decimal values from user.

Problem Statement:
In the program five subjects are contained to deduct average and total marks. Write a program to read the data and determine the following:

  1. Collect the Data for each subject.
  2. Calculate the sum of all subjects.
  3. Using the formula for Sum of subject and Calculating the Average.
  4. Display the result that comes as output in the end.

That is source code of the C program to find the Sum and calculate the Average and percentage of Five subjects. The control statement is used in this code for executing the condition. 

void main() 
          int a,b,c,d,e;
          float f,g,h;
          printf("Enter the Marks Subject maths = ");
          printf("Enter the Marks Subject hindi = ");
          printf("Enter the Marks Subject punjabi = ");
          printf("Enter the Marks Subject english = ");
          printf("Enter the Marks Subject science = ");
          printf("\nTotal Marks = %f ",f);
          printf("\nAverage Marks = %f",g);
          printf("\nPercentage Marks = %f %",h);

Calculate Average and Percentage

If you liked this article, you can also catch us on facebook and Google+

Related Articles (You May Also Like)

Subscribe To Free Daily Newsletter!

Get Free News Updates Delivered Directly To Your Inbox
About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular Computer Notes blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to contact us.

What's New and Popular

Search Content

Advance Courses

Basic Courses

Advertise with Us