I know this is simple, but I need a bit of help. I need to write a program that will prompt the user to enter three integers, and should then print the numbers in ascending order. The hint the teacher gave was to use scanf three times? I'm just confused...
jadedreality
0
Newbie Poster
Recommended Answers
Jump to PostPerhaps you meant to post in the C forum? (This is C++.)
Think about what the program is supposed to do, and write down a sort of "how to" to get it done:
1. get an integer from the user
2. get another integer from the user
3. …
Jump to PostOkay, here's what I have so far:
#include <iostream> #include <conio.h> void main () { clrscr(); int array [3], t; for (int x=0; x<3; x++) { cout << "Enter integer number" << x+1 << " : " << endl; cin<< array[x]; } for (x=0; x<3; x++) { for …
All 7 Replies
Duoas
1,025
Postaholic
Featured Poster
jadedreality
0
Newbie Poster
jadedreality
0
Newbie Poster
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
jadedreality
0
Newbie Poster
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
jadedreality
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.