1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
aleksklad [387]
3 years ago
12

Develop a C program that calculates the final score and the average score for a student from his/her (1)class participation, (2)

test, (3) assignment, (4) exam, and (5) practice scores. The program should use variables, cout, cin, getline(), type casting, and output manipulators. The user should enter the name of the student and scores ranging from 0 to 100 (integer) for each grading item. The final score is the sum of all grading items. The average score is the average of all grading items. Here is a sample output of the program: Enter the Student's name: John Smith Enter Class Participation Score ranging from 0 to 100: 89 Enter Test Score ranging from 0 to 100: 87 Enter Assignment Score ranging from 0 to 100: 67 Enter Exam Score ranging from 0 to 100: 99 Enter Practice Score ranging from 0 to 100: 80 John Smith: Final Score: 422 Average Score: 84.4 Submit: a flowchart . source file Hw3.cpp The screenshot of output
Computers and Technology
1 answer:
White raven [17]3 years ago
5 0

Answer:

Following are the code to the given question:

#include<iostream>//defining header file

using namespace std;

int main()//defining main method

{

float clspat,test,asst,exam,practice,total,average;//defining floating variable

char name[100];//defining char variable to input value

cout<<"Enter Name of Student: ";//print message

cin>>name; //input value

cout<<"Enter scores in following scoring items between 0 and 100:"<<"\n";//print message

cout<<"Enter class participation score: ";//print message

cin>>clspat;//input value

cout<<"Enter test score: ";//print message

cin>>test;//input value

cout<<"Enter assignment score: ";//print message

cin>>asst;//input value

cout<<"Enter exam score: ";//print message

cin>>exam;//input value

cout<<"Enter practice score: ";//print message

cin>>practice;//input value

total=clspat+test+asst+exam+practice;//calculating total value

average=total/5;//calculating average value

cout<<endl<<"SCORE CARD OF "<<name<<"\n"<<"-----------------------"<<"\n";//print value with message

cout<<"Total score: "<<total<<"\n";//print message with value

cout<<"Average score: "<<average; //print message with value

}

Output:

please find the attached file.

Explanation:

In this code, the floating-point variable is declared, which is used for input value from the user-end and after input the floating-point value it uses the "total, average" variable to calculate its respective values and store its value with init, after storing the value into the variable it uses the print method to print its values.

You might be interested in
Two of the major sources used today for obtaining information to create computer maps are satellites and _____________.
nikdorinn [45]
The Global Positioning System or GPS.
7 0
3 years ago
Read 2 more answers
Four differences between fourth and fifth generation of computers​
Juliette [100K]

Answer:

 The following are the four difference between the fourth and the fifth generation of the computer that are:

  • The fourth generation computer technology is basically based of the microprocessor. On the other hand, the fifth generation computer is based upon the artificial intelligence technology.  
  • The fourth generation computer system are faster in computation. Whereas, the fifth generation computer are more reliable and faster in speed as compared to all other generations.
  • The fifth generation computer are small in the size and more potable as compared to the fourth generation computer system.
  • Laptop, notebook and Chromebook are some of the example of fifth generation. Whereas, STAR 100 and IBM 4341 are the example of fourth generation.
7 0
3 years ago
The inflationary gap occurs when you obtain no increase in output, but only an increase in the Average Price Level from an incre
Katarina [22]
<span>B. Second phase of the Keynesian LRAS Curve.</span>
8 0
3 years ago
Which of the following is an example of phishing attack? csp
TEA [102]
There are no examples you imbecile it’s A
4 0
3 years ago
Write a Bare Bones program that takes as input two variables X and Y. (Again, assume these values are set before your program be
Sauron [17]

Answer:

import java.util.Scanner;

public class num8 {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter first number");

       int X = in.nextInt();

       System.out.println("Enter second number");

       int Y = in.nextInt();

       int Z;

       if(X <= Y){

           Z = 0;

       }

       else if(X >= Y){

           Z = 1;

       }

   }

}

Explanation:

  • The program is implemented in Java
  • In order to set the values for X and Y, The Scanner class is used to receive and store the values in the variables (Although the questions says you should assume these values are set)
  • The if conditional statement is used to assign values (either 0 or 1) to variable Z as required by the question.
5 0
3 years ago
Read 2 more answers
Other questions:
  • One type of technology that can verify a person's identity is _____.
    6·2 answers
  • Your network administrator finds a virus in the network software. Fortunately,
    13·1 answer
  • In a ring-based system, procedure p is executing and needs to invoke procedure q. Procedure q's access bracket is (5,6,9). In wh
    15·2 answers
  • Each of the walls of a room with square dimensions has been built with two pieces of sheetrock, a smaller one and a larger one.
    11·1 answer
  • 1-5 Safety measures in the use of kitchen tools and equipment.​
    9·1 answer
  • Assume there are two variables, k and m, each already associated with a positive integer value and further assume that k's value
    13·1 answer
  • Why was the tesla model s help change the was we see EV
    12·1 answer
  • Dynamics
    11·1 answer
  • Under what scenarios can we clear the NVRAM by moving the PSWD jumper to the RTCRST<br> pins?
    8·1 answer
  • Some hackers are skillful computer operators, but others are younger inexperienced people who experienced hackers refer to as?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!