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
Explain about the strategies of implementation of the statecharts, Database Management System?

Program: Write a program that predicts users' age (0-128 years old) with at most 7 questions. The game starts with asking the user whether he/she is younger or older than G (an

C program for function  of average int average(int); void main() {           int max=0,c=0;           clrscr();           printf("ENTER THE LIMIT OF INPUT FOR AV

It is standard on functions to provide some indication that the function has succeeded in its operation. Consider the Scanf function:     scanf("%d",&number1);   If the functio

Given an integer n and a permutation of numbers 1, 2 ... , n-1, n write a program to print the permutation that lexicographically precedes the given input permutation. If the given

How do you declare an integer variable? Explain with an example.

SquareMaze The SquareMaze class should be declared and defined in maze.h and maze.cpp, respectively. Each SquareMaze object will represent a randomly-generated square maze and its

The program sorting.cpp contains a main function for testing the operation of several sort algorithms over various data sizes and data set organisations. The program understands

Explain the parts of operators Assignment Operators The equal (=) sign is used for assigning a value to another. The left hand side has to be a variable (lvalue, which exc

C Program for FUNCTION OF COUNT THE CHARACTERS IN EACH WORD void count(char c[]); void main() {           char a[50];           int i=0;           clrscr();