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

  Does the kind of values assigned to a a variable

Does the kind of values assigned to a a variable (numeric or character) influence the way SAS reads data?

  Write the function day

Write the function day(d, m) where m is an integer from 1 through 12 expressing a month, and d is an integer from 1 through 31 expressing the day part of a date in 2014. The function should return the day name ('Mo', 'Su'.etc)

  Design application using server controls

The name of your Web site should be based on your last name.

  Write a program to help the use and manage the file

Write a program to help the use and manage the file. The data from the file will be stored during program execution as an array of records, with one record (struct) for each. The array should be declared to hold up to 500 records.

  Is this an example of head or tail recursion

Referring to the code in Part 1, use the substitution model to illustrate what the result of calling (add1-iter '(1 2 3)) will be. Why is the list reversed ?

  Improve jsp functionto traverse and list on the screen

Create an XHTML document with the JavaScript code to open and build the DOM tree for orders.xml as in the seminar, but them also loads in and builds another DOM tree for another fileâ?¦ say orders2.xml as shown below

  Recursive method to replace all occurrences of character

Write down the program which uses the recursive method to replace all occurrences of character with another character in given sentence.

  Unix programming

UNIX Programming

  Create database tables in mysql

Write the SQL command to find any tutors who have not submitted a report for July

  Historical principle for loss to the company is minimal

A colleague of yours frequently takes small amounts of office supplies, noting that the loss to the company is minimal. Your rationale expresses which historical principle?

  Give greedy algorithm to get all n people across bridge

Give a greedy algorithm to get all these n people across the bridge in a fastest way. Describe the algorithm briefly. Prove the correctness.

  List comprehension to return a list of all the numbers

Write a higher order function list To that takes a function f and a number n and uses list comprehension to return a list of all the numbers from 1 to n for which the function fevaluates to True.

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