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
What is the binary for O?​
nevsk [136]

Answer:

01001111

Explanation:

8 0
2 years ago
Read 2 more answers
Write a function DrivingCost() with input parameters drivenMiles, milesPerGallon, and dollarsPerGallon, that returns the dollar
posledela

Answer:

#include <iostream>

using namespace std;

double DrivingCost(int drivenMiles,double milesPerGallon,double dollarsPerGallon)

{

   double dollarsperMile=dollarsPerGallon/milesPerGallon;//calculating dollarsperMile.

   return dollarsperMile*drivenMiles;//returning thr driving cost..

}

int main() {

double ans;

int miles;

cout<<"Enter miles"<<endl;

cin>>miles;

ans=DrivingCost(miles,20.0,3.1599);

cout<<ans<<endl;

return 0;

}

Output:-

Enter miles

10

1.57995

Enter miles

50

7.89975

Enter miles

100

15.7995

Explanation:

In the function first I have calculated the dollars per mile and after that I have returned the product of dollarspermile and driven miles.This will give the cost of the Driving.

4 0
2 years ago
There are numerous strict and steadfast rules when it comes to composition.
erastova [34]

Answer:

false

Explanation:

none ¯\_(ツ)_/¯

6 0
2 years ago
On early computers, every byte of data read or written was handled by the CPU (i.e., there was no DMA). What implications does t
grandymaker [24]

Answer:

Multiprogramming will be extremely difficult to be achieved.

Explanation:

If every byte of data read or written is handled by the CPU the implications this will have for multiprogramming are not going to be satisfactory.

This is because, unlike before, after the successful completion of the input and output process, the CPU of a computer is not entirely free to work on other instructions or processes.

5 0
3 years ago
A dns query failure is referred to a higher level domain name server under what condition
zalisa [80]
Within the Flags detail is a flag titled recursion desired. This flag shows whether or not the local DNS should continue to query other DNSs if it is not able to resolve the current query. As DNS is local, it may or may not have the enough information to allow the address to be resolved. If the recursion flag is set, the local <span>DNS will continue to query higher level DNSs until it is able to resolve the address.  In short, t</span>he condition is when a flag is raised and it doesn’t have enough <span>information to allow the request.</span>
5 0
2 years ago
Read 2 more answers
Other questions:
  • Write any 2 differences between implicit variables and explicit variables.​Plz tell :' (
    10·1 answer
  • What kinds of online behaviors could be considered cyberbullying?
    7·2 answers
  • True or false A ClassB fire involves live electrical equipment
    5·1 answer
  • What are the features of a strong résumé? Check all that apply. The résumé is printed on regular printer paper. The résumé is we
    5·2 answers
  • In terms of object-oriented programming, after a class is defined,
    11·1 answer
  • How many pieces are there in a normal laptop??? Good luck and solve carefully
    9·1 answer
  • -Convert the 1's complement 10111010 to decimal
    15·2 answers
  • JAVA QUESTION::
    10·1 answer
  • Use the drop-down menus to complete statements about archiving and backing up data fileArchiving data files manages the size of
    5·2 answers
  • how risk can impact each of the seven domains of a typical IT infrastructure: User, Workstation, Local Area Network (LAN), Local
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!