Write console program to read in a text file of first names

Assignment Help Programming Languages
Reference no: EM131205445

1. Loops: The greatest and the least- Write a program with a loop that lets the user to enter a series of integers. The use should enter -99 to signal the end of the series. After all the numbers have been entered, the program should display the largest and smallest numbers entered.

2. File I/O: Read in inputs from a text file and copy them to an output file.

Write a console program to read in a text file of first and last names, print them on the screen, and write them (one first / last name per line) to another file. On the screen, the first name should be written to the file in a column 10 chars wide, and the 2nd should be written in a column next to it 10 chars wide. The users should be prompted for both filenames, and the program should verify that the files can be opened, printing an error message if not. Both files should be closed at the end of the program

Output from your program should look like the following, on the screen and in the file your program creates (assuming the file "names.txt" contains Trey Anastasio Maynard Keenan Candy Cane Davey Jones)

Enter the name of the input file: names.txt

Enter the name of the output file:out.txt

Names:

Trey                Anastasio

Maynard           Keenan

Candy              Cane

Davey              Jones.

Reference no: EM131205445

Questions Cloud

Usefulness of office suites : Assume that you did not have access to Microsoft Office or other compatible application suites. Describe at least three (3) tasks that you would not be able to perform without Microsoft Office 2013.
Discuss the benefits of a forensic readiness plan and name : Develop a response to Mr. Jenkins that addresses how the parameters of search and seizure will change by involving the police in the investigation at this time. Support your answer.
Difference between function and stored procedure : What is Difference between Function and Stored Procedure?
Examine the diversity of views associated with corporate : The purpose of this assignment is to examine the diversity of views associated with corporate social responsibility and challenge students to consider their own views.
Write console program to read in a text file of first names : Write a console program to read in a text file of first and last names, print them on the screen, and write them (one first / last name per line) to another file
Read the case and answer given questions : What do you think was behind the phasing in of the various provisions of the Affordable Care Act? Would you have phased them in differently?- how would you define the problem differently?
What does this imply for the us debate on health care : What has happed to health care costs compared to other consumer spending? What does this imply for the US debate on health care?
Written assignment-auditing database activities : After an intensive investigation you found out that some users were abusing their privileges.  You decide to implement a solution in which users are audited when they create any database object.
Value into the variable name : Write some code that reads a value into the variablename then prints the message "Greetings, NAME" on a line by itself, where NAME is replaced the value that was read into name. For example, if your code read in "Rachel" it would print out "Greeti..

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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