Coders Packet

C++ code for marks entry in school/college

By Harsh Kumar jha

In this C++ code, teachers can enter marks of every student only after entering the correct password. And the student can see their report card after entering their roll number.

This code can be accessed by both students and teachers simultaneously. After compiling this program user will be asked whether he/she wants to access it as a teacher or student. It will print as follows :

Login as :
1)Teacher
2)Student
3)EXIT
====>

If the user is a teacher he/she will enter 1 or if a user is a student he/she will press 2 or 3 to exit from the program. If user enters 1 following message will be printed :

Enter the password :

Password will be provided to each and every teacher so that they can access this program. I have fixed the password as "190105". If they enter the correct password then they will be asked to enter the number of students whose data they want to enter then the teacher will enter the marks of all subjects one by one. Or if teachers enter the wrong password then the wrong password will be printed. If the user is a student he will enter 2 and then he will be entering his roll number. If the roll number is correct, his/her marks will be shown in the following manner :

REPORT CARD
Displaying Result Of ROll Number 1
Name - ABC XYZ
English : 98/100
Maths : 91/100
Computer : 92/100
Science : 91/100
Hindi : 99/100
Total = 471/500
Percentage = 94.2 %
Grade= A

 

No. students who got distinction is 1 and no of students who failed is 0

*Note=Grade F means FAIL

or if he enters the wrong roll number then "wrong roll number" will be printed.

Download Complete Code

Comments

No comments yet