C++programming

posted by .

Write an interactive C program that will accept each student’s name an exam grades as input, determine an average grade for each student, and then display the student’s name, the individual exam grades and the calculated average.
The program should allow for unequal weigthing for the individual exam grades. In particular, assume that each of the first four exams contributes 15 percent to the final score, and each of the last two exams contributes 20 percent.
A class of students earned the following grades for the five examinations taken in a C programming course.
No Name Exam Scores (percent)
Ahmad
90
85
88
70
84
95
Chong Wei Wei
98
87
97
90
88
85
Muthu
88
87
90
95
78
92
Elizabeth
66
70
54
50
70
61
Julia
74
85
60
57
71
75
Siti
80
75
68
77
60
79
Wong Ah Seng
56
68
78
80
55
88
Hemalata
78
65
74
80
70
82
Alexander
50
45
55
60
70
45
Awang
60
55
42
50
60
55

  • C++programming -

    I must say, you got a lotta nerve. Don't expect anyone to write this for you. But we will take a look at what you have.

    On the other hand, the compiler will do that for you, and simply running your code will verify its function.

    A bare-bones version of this cannot be more than two or three dozen lines of code.

    There are oodles of online documentation if you can't figure out which C++ routines to use.

  • C++programming -

    #include "stdafx.h"
    #include <iostream>
    #include <iomanip>
    #include <string>
    using namespace std;

    int _tmain(int argc, _TCHAR* argv[])
    {
    const int number of students = 10;
    const int number of scores = 6;
    double scores[number of scores];
    double total;
    double average;

    string name[number of students] = {"Ahmad", "Chong Wei Wei", "Muthu", "Elizabeth", "Julia", "Siti", "Wong Ah Seng", "Hemalata", "Alexander", "Awang"};
    double grades[number of students][number of scores] = {{90,85,88,70,84,95},{98,87,97,90,88,85},{88,87,90,95,78,92},{66,70,54,50,70,61},{74,85,60,57,71,75},{80,75,68,77,60,79},{56,68,78,80,55,88},{78,65,74,80,70,82},{50,45,55,60,70,45},{60,55,42,50,60,55}};

    cout <<"Student's Name Grade\n";
    cout <<"------------"<< setw(14) << "-------\n";

    for (int student = 0; student < number of students; student++)
    {
    total = 0;

    for (int col = 0; col < number of scores; col++)
    total += scores[student][col];
    average = total / number of scores;
    cout << setw(9) << left << name[student];
    cout << setw (14) << right << average << endl;
    }

    int BestStudent = 0;

    if(scores[i][j] > highest)
    {
    highest = scores[i][j];
    BestStudent = i;
    }

    cout << "The student with the highest average is" << name[BestStudent] << "and the average is" << higest << endl;
    }
    How to solve this problem???
    fatal error C1083: Cannot open include file: 'stdafx.h': No such file or directory

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. comper science

    write a program that accept the name of a student score obtained in 5 courses and compute the average score of the student.your program must display the name of that student on tab 5
  2. l;k

    Write a program that asks the user to enter the student’s name (first and last), and his/her first exam grade of three students, and then display them in a neat format. After that the program will find the average of the three grades, …
  3. programming logic

    The program will accept user input to store the student's first and last name . If the name is ZZZ, then the program will end. The program will accept: a text entry for the class number (e.g., CGS 1000, COP 1000, etc.) a numeric value …
  4. CIS 115

    Design a solution that requests and receives student names and an exam score for each. The program should continue to accept names and scores until the user inputs a student whose name is “alldone”. ***After the inputs are complete …
  5. Java Programming

    I'm new to Java and I'm not sure how to write the source code for this problem I got in class... Write a java program using the while and if statement that will accept ten student grades and that will display the sum of the grades, …
  6. Programming

    I need help with debug Debug06-02 // Program lets user input scores on four tests // Average is computed and letter grade is determined // Letter grades are based on 90 for an A, 80 for a B, and so on start string name num score num …
  7. programming

    create a c++ code that will set first the number of the student to be entered then get the name and their grades, After that display the name, grades & remarks of the student using arrays
  8. visual basic programming

    Write a Visual Basic program that will calculate the assessment marks of a student taking the Computer Programming subject in College. The program must be able to determine the total result and finally display the grade of that student. …
  9. algebra

    A student's grade in a course is the average of 4 test grades and a final exam that is worth three times as much as each test. Suppose a student has test grades of 90, 88, 81, and 94. Write an equation to model this situation where …
  10. Programming C++ using Data Structure.

    In an academic institution, Student has its records. Each student has his/her profile such as id number, student name. The institution also keeps records of student grades in each subject. Student grades contains information subject …

More Similar Questions