The first output is:
Group Project in
IT221-Data Structures
Submitted by:
Juna Char
Mai Char
submitted to:
Emo
please press enter to continue....
The second output is:
Select the following choices:
1. STACKS
2. QUEUES
3. TREE
4. SORTING
*Under the Stacks you can have 1 sample program
like testing contiguous implementation.
*Under the Queues you can have 1 sample program
like Using queues of strings.
*Under the Tree you can have traversal or binary tree.
*and under the Sorting you can have the 3 simple sorting:
bubble sorting, selection sorting and insertion.
2 days ago - 1 day left to answer
I need to have the the c++ code for this one..i really need it...help me pls!!!!?
Just a thought, but by looking at this problem you are in about a freshman/sophomore college level class, most likely going into Computer Science or Management Information Systems... Since you chose this degree, I suppose you have many more courses to take, such as OS, Architecture, Automata, SE, etc, you might want to learn about basic programming and data structures... Try learning it on your own... It might help for future courses.
Reply:Look, the display is pretty straightforwarward. And it looks like the required actions are display.
My teacher in college told us that C (and C++) is a language that in and of itself doesn't DO much, until you add libraries.
for the display screens on a windows system the libraries you need are iostream and cstdlib which you begin the program by telling the compiler you need thus:
#include %26lt;iostream%26gt;
#include %26lt;cstdlib%26gt;
Because of a change in the language a few years back, the next line is required to keep the syntax from being impossibly convoluted. I won't explain it because it wouldn't help.
using namespace std;
Notice the semicolon at the end. Most but not all of the statements which follow should end with a semicolon. If they don't then the program won't compile.
This next line is the first exception:
void main(){
After this you need to know a few commands/operators:
cout is the standard output. In other words the screen.
%26lt;%26lt; sends something somewhere, usually to cout.
endl. is the end of the line. When you send it to cout it moves to the next line of output.
system() from cstlib is a function which calls another program which is why this can only work with Windows. You;ll be calling a program which doesn't work in Linux or MacOS.
Now for the code:
cout %26lt;%26lt; "Group Project in" %26lt;%26lt; endl;
cout %26lt;%26lt; "IT221-Data Structures" %26lt;%26lt; endl;
cout %26lt;%26lt; endl;
cout %26lt;%26lt; "Submitted by:" %26lt;%26lt; endl;
cout %26lt;%26lt; "Juna Char" %26lt;%26lt; endl;
cout %26lt;%26lt; "Mai Char" %26lt;%26lt; endl;
cout %26lt;%26lt; endl;
cout %26lt;%26lt; "submitted to:" %26lt;%26lt; endl;
cout %26lt;%26lt; "Emo"; %26lt;%26lt; endl;
cout %26lt;%26lt; endl;
cout %26lt;%26lt; endl;
cout %26lt;%26lt; "please ";
system("pause");
That is your first screen and that's all I think you need. Close off the program with a '}' and an enter.
}
Pause stops the program prints out "press any key to continue" and waits for you to press a key before continuing. Therefore all the elements you want are there on the screen.
You probably can do the second screen yourself. If this is for college you should. If you want to know how to implement the menu choices you should tell us how the stacks, queues and trees are implemented. There are two ways of doing each -- with arrays and with pointers -- and we don't have enough information to try any of them.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment