PPS Mini Project
PPS Mini Project
Description:
This project will create a program that calculates the Total marks,
average grade of a student based on their marks in different subjects.
Features:
• Input:
o The program will prompt the user to enter the number of subjects.
o The user will then be asked to enter the marks obtained in each
subject.
• Calculation:
o The program will calculate the total marks obtained.
o The program will calculate the average marks.
• Output:
o The program will display the total marks obtained by the student.
o The program will display the average marks obtained by the
student.
o The program will display the grade of the student based on the
average marks (e.g., A+, A, B+, B, etc.). You can define your own
grading system.
Learning Objectives:
• Variables and data types (int, float)
• Arrays
• Input/output using scanf and printf
• Loops (for loop)
• Conditional statements (if-else)
• Basic arithmetic operations
C Code:
#include <stdio.h>
int main() {
int num_subjects, i;
float marks[100], total_marks = 0, average;
return 0;
Output:
• Display the total marks, average marks, and the corresponding
grade to the user.
Explanation:
• The code starts by including the stdio.h header for
input/output operations.
• It then declares variables to store the number of subjects,
marks, total marks, average marks, and the grade.
• The user is prompted to enter the number of subjects and the
marks obtained in each subject.
• The code calculates the total and average marks.
• Based on the average marks, the grade is determined using if-
else statements.
• Finally, the total marks, average marks, and the grade are
displayed to the user.
Conclusion:
This simple project demonstrates the use of basic C programming
concepts such as:
• Variable declaration and initialization
• Input/output operations using scanf and printf
• Arrays to store multiple values
• Loops for iteration
• Conditional statements (if-else) for decision-making