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
Rina8888 [55]
3 years ago
14

Suppose that a text file Exercise13_3.txt contains an unspecified number of scores.Write a c++ program that reads the scores fro

m the file and display their total and average.Scores are seperated by blanks.
Instead of displaying the results on the screen, send the results to an output named using your last name.

In addition to finding the average and total, find the number of grades.

Input

Example: Contents of Exercise13_3.txt:

70 88 91 95

66 82 71 99 84 57

80 100 93 73 82

Output

Contents of YourLastName.txt:

Your first and last name

Number of grades = 16

Total of all grades = 1231

Average grade = 82.1
Computers and Technology
1 answer:
ki77a [65]3 years ago
5 0

Answer:

#include <iostream>

#include <cmath>

#include <math.h>

#include <fstream>

#include <string>

#include <numeric>

using namespace std;

int main()

{

ifstream infile;

float num;

float total;

float x;

float aver;

x=0; total=0;

infile.open("Exercise13_3.txt");

while(!infile.eof())

{

infile>>num;

total=total+num;

x++;

}

aver=(total-num)/(x-1);

cout << "Number of grades = " <<x<< "\n";

cout<< "Total of all grades = " <<total<<'\n';

cout<< "Average grade = "<<aver<<'\n';

cout<< ""<<'\n';

infile.close();

getchar();

return 0;

}

You might be interested in
Which of the following describes the IP address of a router to which packets destined for a remote network should be sent by def
Elena-2011 [213]

The term that describes the IP address of a router to which packets destined for a remote network should be sent by default is the a gateway of last resort.

<h3>What is 'Gateway Of Last Resort'? </h3>

A Gateway of Last Resort is known to be the Default gateway and this is said to be a route that is known to be often used by the router if no other known route is seen to transmit the IP packet.

Note that Known routes are seen in the routing table. but, any route not known by the routing table is said or known to be forwarded to the default route.

Hence the primary function of a router is so that it can forward packets toward a given destination.

Therefore, The term that describes the IP address of a router to which packets destined for a remote network should be sent by default is the a gateway of last resort.

Learn more about IP address from

brainly.com/question/24930846

#SPJ1

3 0
2 years ago
What are three characteristics of a vlan access port?
Effectus [21]
1.) switch port can become an access fourth or static or dynamic configuration.
2.) and access port is associated with a single VLAN.
3.) in access port is created with the switch port mode access command and then associated with a VLAN with the switchport access VLAN command.
7 0
3 years ago
A named storage location in the computer's memory that holds a piece of information is a(n):
DaniilM [7]
Variable or scalar is a storage address (identified by a memory address) paired with an associated symbolic name, which contains some known or unknown quantity of information referred to as a value.
5 0
3 years ago
Trish bought a new computer that she has been using for a few weeks. She is starting to experience pain in her wrists, back and
Ostrovityanka [42]

<span>Good Posture – Trish should look for a good ergonomic chair that will help with her aches.  She should identify her natural posture and memorize it.</span>

<span>Regular movement and work organization – Encourage regular breaks and stretch or walk around the office.  At least once an hour is recommended.</span>

Position of the screen – Trish should consider factors such as distance, height, and angle of the screen.






5 0
3 years ago
Read 2 more answers
What is the ratio between total bits required for such a cache implementation over the data storage bits?
Luda [366]
<span>Answer: [ 128 * (32*8 + 20 + 1) ] / [ 128 * (32*8) ] = 277/256</span>
6 0
4 years ago
Other questions:
  • What is the cheapest type of printer to buy and run?
    11·2 answers
  • Ranges of IP address that anyone can use for their internal networks are known as ______.
    8·2 answers
  • How to change a documents theme colors in word?
    9·1 answer
  • Test if a number grade is an A (greater than or equal to 90). If so, print "Great!". Sample Run Enter a Number: 98 Sample Output
    7·1 answer
  • Are the buying and selling of stocks centralized activities? Why or why not?
    10·2 answers
  • Input 10 integers and display the following:
    6·1 answer
  • Write a method so that the main() code below can be replaced by simpler code that calls method calcMilesTraveled(). Original mai
    11·1 answer
  • What is the best scenerio for
    11·2 answers
  • Chang investigates ways to improve the interactivity of computer hardware. His job title is best described as ✓ Computer and Inf
    14·1 answer
  • Complete the following sentence. <br> _______ is often used to solve riddles and puzzles.
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!