Question

Tasks: Write a program to calculate the average score for a student. The class has three hands-on test (30%), two assignments

0 1
Add a comment Improve this question Transcribed image text
Answer #1

C Code:

#include <stdio.h>

int main()
{
float a, b, c, avg1, avg2, avg3, overallavg;
printf("Enter the marks in Three hands on test\n");    //Enter Three hands on test marks
scanf ("%f %f %f", &a, &b, &c);
avg1 = (a+b+c)/3;                                       //Calculate average of Three hands on tests                      
printf("Enter the marks in Two assignments\n");           //Enter Two assignments marks
scanf ("%f %f", &a, &b);
avg2 = (a+b)/2;                                           //Calculate average of Two assignments
printf("Enter the marks in Final exam\n");               //Enter marks
scanf ("%f", &avg3);
overallavg = (0.3*avg1+0.2*avg2+0.5*avg3);               //Calculate overall average  
printf("The Overall average of the student is %f\n", overallavg); //Display overall average
return 0;
}

Program Screenshot:

7 C Student Average.c 1 #include <stdio.h> 2. 3 int main() 4 { float a, b, c, avgi, avg2, avg3, overallavg; 6 printf(Enter t

Output Screenshot:

Enter the marks in Three hands on test 95 94 93 Enter the marks in Two assignments 95 94 Enter the marks in Final exam 92 The

Flowchart:

Start A Enter Three hands on test marks Display the Overall Average marks exerallaxg Calculate Average of Three hands on test

Add a comment
Know the answer?
Add Answer to:
Tasks: Write a program to calculate the average score for a student. The class has three...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • using C# Write a program which calculates student grades for multiple assignments as well as the...

    using C# Write a program which calculates student grades for multiple assignments as well as the per-assignment average. The user should first input the total number of assignments. Then, the user should enter the name of a student as well as a grade for each assignment. After entering the student the user should be asked to enter "Y" if there are more students to enter or "N" if there is not ("N" by default). The user should be able to...

  • I've built a C++ program that calculates the user's class average based on three test. Can...

    I've built a C++ program that calculates the user's class average based on three test. Can somebody show me how to get the program to look for invalid input? #include <iostream> #include <string> #include <iomanip> using namespace std; int main() { //variables int score_1; //test 1 input from user int score_2; //test 2 input from user int score_3; //test 3 input from user int highest; // the higher score of test 1 & 2 int course_average; //average for class //Introduce...

  • Write a program that performs the following: 1. Presents the user a menu where they choose...

    Write a program that performs the following: 1. Presents the user a menu where they choose between:              a. Add a new student to the class                           i. Prompts for first name, last name                           ii. If assignments already exist, ask user for new student’s scores to assignments              b. Assign grades for a new assignment                           i. If students already exist, prompt user with student name, ask them for score                           ii. Students created after assignment will need to...

  • Professor Dolittle has asked some computer science students to write a program that will help him...

    Professor Dolittle has asked some computer science students to write a program that will help him calculate his final grades. Professor Dolittle gives two midterms and a final exam. Each of these is worth 100 points. In addition, he gives a number of homework assignments during the semester. Each homework assignment is worth 100 points. At the end of the semester, Professor Dolittle wants to calculate the median score on the homework assignments for the semester. He believes that the...

  • Write a program that will calculate each student’s average score over several tests. The program will...

    Write a program that will calculate each student’s average score over several tests. The program will ask for the number of students, and the number of scores per student. Then, for each student, it will ask for all test results and display the average. The output should look similar to what is shown below (sample user input is shown in bold) ( write by python and Screenshot it for me , thank) How many students do you have? 3 How...

  • Hello, I am trying to calculate a student current average in a class based on their...

    Hello, I am trying to calculate a student current average in a class based on their Quiz, Homework, Test, Project, and Final Exam grade. Quizzes are worth 20% of the grade. Homework is 15% of the grade. Tests are 35% of the grade. Projects are worth 10% of the grade and the Final Exam is worth 20% of the grade. The program reads how many quizzes, tests, homework, and projects the user enters and the scores that are entered by...

  • Many classes calculate a final grade by using a weighted scoring system. For example, “Assignments” might...

    Many classes calculate a final grade by using a weighted scoring system. For example, “Assignments” might be worth 40% of your final grade. To calculate the grade for the Assignments category, the teacher takes the percentage earned on the assignments and multiplies it by the weight. So if the student earned a 90% total on the Assignments, the teacher would take 90% x 40, which means the student earned a 36 percent on the Assignments section. The teacher then calculates...

  • Create a C++ program to calculate grades as well as descriptive statistics for a set of...

    Create a C++ program to calculate grades as well as descriptive statistics for a set of test scores. The test scores can be entered via a user prompt or through an external file. For each student, you need to provide a student name (string) and a test score (float). The program will do the followings: Assign a grade (A, B, C, D, or F) based on a student’s test score. Display the grade roster as shown below: Name      Test Score    ...

  • Implement a C program to calculate the Average Score Point(ASP) of a student taking N courses...

    Implement a C program to calculate the Average Score Point(ASP) of a student taking N courses in a semester. Ask the user for the number of courses(N) the student is taking in the semester, and check if the number of courses is greater than 1 (>1). If the number of courses is less than or equal to 1(<=1), display an error and ask the user to try again until the right input is entered. Next, ask the user for the...

  • Write a class called Student. The specification for a Student is: Three Instance fields name -...

    Write a class called Student. The specification for a Student is: Three Instance fields name - a String of the student's full name totalQuizScore - double numQuizesTaken - int Constructor Default construtor that sets the instance fields to a default value Parameterized constructor that sets the name instance field to a parameter value and set the other instance fields to a default value. Methods setName - sets or changes the student name by taking in a parameter getName - returns...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT