Software & Finance Forums

### Author Topic: Mark Calculation Based on Assignment, Coursework, Quiz and Final Exam  (Read 2182 times)

#### kathir

• Sr. Member
• Posts: 283
##### Mark Calculation Based on Assignment, Coursework, Quiz and Final Exam
« on: November 13, 2011, 01:35:58 am »
Multimedia Creative Design(STIV3073) subject allocates its mark percentage by 60% and 40% where the 60% represents the coursework and the 40% represents the final exam. Coursework is constituted of quizzes,assingments and a final project which carry the percentage of 10%,20%, and 30% respectively. There are 10 quizzes and only the best five are selected to be calculated as a part of the carry mark. four assingment must be completed in order to contribute to the carry mark's total and as for the final project; a complete digital multimedia art work with a written report must be submitted. Both carry the percentage of 20% and 10% respectively.

Develop a system that counts the total percentage of the subject and based on the total percentage obtained; determine the grade acquired for the subject.

Code:
```//Source Code Listing

#include <stdio.h>
#include <conio.h>

typedef struct _MCD_Student
{
char name[128];
// coursework
char quiz[10]; // only best 5, 10%
int quizMarks;
int assignments[4]; // 20%
int assignmentsMarks;
int multimedia_artwork; // 20%
int written_report; // 10
int finalexam; // 40%
int total;
} MCD_Student;

void main()
{
int i = 0, count = 0;
MCD_Student student;

printf("Enter Student Name: ");
scanf("%s", student.name);

// Enter the quiz information
printf("\nEnter Quiz information for the student");
for(i = 0; i < 10; i++)
{
printf("\nQuiz [%d] correct ? : ", i + 1);
student.quiz[i] = getche();
if(student.quiz[i] == 'y' || student.quiz[i] == 'Y')
count++;
}
if(count >= 5)
count = 5;
student.quizMarks = count * 2;

printf("\nEnter 4 Assignment information for the student");
student.assignmentsMarks = 0;
for(i = 0; i < 4; i++)
{
printf("Assignment [%d] Mark out of 5 : ", i + 1);
scanf("%d", &student.assignments[i]);
if(student.assignments[i] > 5)
student.assignments[i] = 5;
else if(student.assignments[i] < 0)
student.assignments[i] = 0;
student.assignmentsMarks += student.assignments[i];

}

printf("Enter Multimedia Artwork Marks out of 20 : ");
scanf("%d", &student.multimedia_artwork);
if(student.multimedia_artwork > 20)
student.multimedia_artwork = 20;
if(student.multimedia_artwork < 0)
student.multimedia_artwork = 0;

printf("Enter Written Report Marks out of 10 : ");
scanf("%d", &student.written_report);
if(student.written_report > 10)
student.written_report = 10;
if(student.written_report < 0)
student.written_report = 0;

printf("Enter final exam marks out of 40 : ");
scanf("%d", &student.finalexam);
if(student.finalexam > 40)
student.finalexam = 40;
if(student.finalexam < 0)
student.finalexam = 0;

student.total = student.quizMarks + student.assignmentsMarks + student.multimedia_artwork + student.written_report + student.finalexam;

printf("\n\nTotal Marks for %s is : %d\n", student.name, student.total);
}

```

Disclaimer: This web site is for educational and informational purposes only. Click here to read the Disclaimer.