Programming Assignment 4, C/C++ Programming

For this program, you are going to modify your previous program (program 3) so that it will now have a menu to see if the user wants to read the input from a file or interactively. 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.

Your initial menu will look like the following:
Menu
<1> Read data from a file
<2> Read data interactively
Enter choice:

Here is a sample input file:

21 25
30 30
10 12
55 60
-1 /* this is the flag to end inputting the assignment data */
21 25
30 30
10 12
21 25
30 30

Here is another sample input file:

21 25
30 30
10 12
55 60
-1 /* this is the flag to end inputting the assignment data */
21 25
-1 /* this is the flag to end inputting the midterm exam data */
21 25
30 30


On the due date, students should hand in an updated/corrected flow chart of the program and a printout of the source code (make sure it is documented properly according to the UHCL guidelines) (in an envelope) during class, and upload the source code to the link on my website.
Posted Date: 4/5/2013 11:26:15 AM | Location : United States







Related Discussions:- Programming Assignment 4, Assignment Help, Ask Question on Programming Assignment 4, Get Answer, Expert's Help, Programming Assignment 4 Discussions

Write discussion on Programming Assignment 4
Your posts are moderated
Related Questions

how to make basics strong and best logic skills what are the best way to be a expert programmer ? what counts a lot knowledge or practice?

Deliverables: you are required to upload your c code in the assignment dropbox set in Moodle. You are supposed to work with Linux gcc compiler and pico editor for compiling via the

BACKGROUND: FILE SYSTEMS  In a computer, a file system (sometimes written filesystem) is the way in which files are named and where they are placed logically for storage and ret


Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

#questio#A Padovan string P(n) for a natural number n is defined as: P(0) = ‘X’ P(1) = ‘Y’ P(2) = ‘Z’ P(n) = P(n-2) + P(n-3), n>2 where + denotes string concate

C Programming and Data Structures 1. Define and explain flow chart with an example. 2. Write an algorithm to print all even numbers in descending order and draw the flowcha

Problem Description There is a pebble merchant. He sells the pebbles, that are used for shining the floor. His main duty is to take the length of the room’s sides. But he sometime

A Padovan string P(n) for a natural number n is defined as: P(0) = ‘X’ P(1) = ‘Y’ P(2) = ‘Z’ P(n) = P(n-2) + P(n-3), n>2 where + denotes string concatenation.