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...

  • 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...

  • 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...

  • Need code written for a java eclipse program that will follow the skeleton code. Exams and...

    Need code written for a java eclipse program that will follow the skeleton code. Exams and assignments are weighted You will design a Java grade calculator for this assignment. A user should be able to calculate her/his letter grade in COMS/MIS 207 by inputting their scores obtained on worksheets, assignments and exams into the program. A skeleton code named GradeCompute.java containing the main method and stubs for a few other methods, is provided to you. You must not modify/make changes...

  • Java Program: In this project, you will write a program called GradeCalculator that will calculate the...

    Java Program: In this project, you will write a program called GradeCalculator that will calculate the grading statistics of a desired number of students. Your program should start out by prompting the user to enter the number of students in the classroom and the number of exam scores. Your program then prompts for each student’s name and the scores for each exam. The exam scores should be entered as a sequence of numbers separated by blank space. Your program will...

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
ADVERTISEMENT