Containing two columns of integers

Assignment Help Basic Computer Science
Reference no: EM131716256

Write a program that reads a file (prompt user for the input file name) containing two columns of integers. Print the sum of each column. Use a loop to read the data from the file. 

Use the following data for the input file:

20 10     1

25 100   2

35 200   3

25 1000  4

The output should be:

The sums are 105, 1310, and 10.

Reference no: EM131716256

Questions Cloud

Define a class employee where one object of class employee : Define a class Employee where one object of class Employee represents one Employee. Each Employee object will have:
Estimate the squared standard error of the sample mean : As part of a health study, a researcher wants to know the average daily intake of vitamin E for the typical adult.
Evaluate the elements of the current immigration law : Explain what businesses must do to protect employees against gender discrimination and sexual harassment. - To do
What is the probability of getting a sample mean : Assuming normality, what is the probability of getting a sample mean this low or lower if the claims about the mean and standard deviation are true?
Containing two columns of integers : Write a program that reads a file (prompt user for the input file name) containing two columns of integers.
Consider the impact a principal and agent creates : Compare how express, implied, and apparent authority created by the principal and agent impacts equal opportunities for employees.
Describe patient-care technologies : Describe patient-care technologies as appropriate to address the needs of a diverse patient population - Identify patient care technologies, information systems
Discuss what are your reactions to the films violence : Do such depictions sensitize or desensitize one to violence, What are your reactions to the film's violence
Explain the significance of the special covenant : Explain the significance of the special covenant between the Jewish people and God. Name at least two examples of this covenant in the Jewish religion.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Why we did not mention multiplexing/demultiplexing services

When we say that the transport layer multiplexes and demultiplexes applicationlayer messages, do we mean that a transport-layer protocol can combine several messages from the application layer in one packet? Explain.

  Which logic equations should be valid

Which one of the subsequent four logic equations would be valid for the o6 output of a decoder with address lines a0, a1, a2 and outputs o0, o1, o2, o3, o4, o5, o6, o7?

  Sum of the cubes of the digits

Write a program using while loop that can read an integer number and determines whether the sum of the cubes of the digits is equals to the number itself. display a message indicating whether the sum of the cubes is equal or not equal to the numbe..

  Research methods to explain connectivity needs star clothing

Research the alternatives to address the connectivity needs for Star Clothing, and make a recommendation that includes the following.

  Create a 90% confidence interval for the mean

If you wanted to estimate the mean annual rainfall with a margin of error of only 2 inches, how many years' data would you need?

  Discuss the telecommunication applications and services

Discuss the following telecommunication applications and services: (i) Caller ID, (ii) Automatic Call Distribution, (iii) Automated Attendance

  Important telephone numbers

She maintains a list of friends, identified by unique FID's (friend identifiers) and a list of DVD's, identified by DVDID's (DVD identifiers). With each friend is the name and the all-important telephone numbers (Home and Work) which she can call ..

  What is the average waiting time for each of service types

Cars arrives at a quick service cars arrives at a quick service garage as a poisson process with a mean of 10 minutes.there are two bays at the garage.

  When the federal government increases interest rates

When the federal government increases interest rates, they only have so much control, why is that?

  Main program will output the sum

The main program should then call a function sum that will calculate the sum of the values and return this sum back to the main program. The main program will output the sum. This program shows that you can successfully pass a two-dimensional arra..

  How would you modify the node-insertion algorithm

How would you modify the node-insertion algorithm described in Section 20.7.7?

  Write a counter-controlled loop to initialize values

In the boy of the loop, I need to multiply the value of the loop control variable by 10 and by 100, then I need to change the value of the loop control variable in the body of the loop.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd