Hi
I have this problem, I'm currently practicing for my exam at friday, the topic is programming. So i got the objective to make a program, where you input 3 number, and the program then sorts out which one of them is the highest number. Problem is, that i can't make it work the way i want it to. i got a little less than half done (first half is where the problem is), but i might need some advise concerning how to make the last part too.
Here's how it looks so far:
#include <iostream>
#include <conio.h>
#include <stdio.h>
using namespace std;
int main()
{
int a, b, c; //Here i'm defining a, b and c.
a;
cout<< "Please type a number: \n"; //You need to type the first number here.
cin.get(); //As far as i understand, this gets the number
//and uses it as output.
b;
cout<< "please type your second number: \n"; //Second number coming here
cin.get();
c;
cout<< "please type your last number: \n"; //Last number is to be inserted here.
cin.get();
cout<<a <<b <<c <<endl; //This sums up what's written so far.
}
Ï could really use some help, since i've been using almost this whole week to prepare properly...
The problem in it is, that when i run it, i can type the first number without any problems, but when i press enter after having typed first number, both the second and last line appears without me getting to type anything. I tried putting a "getch();" in between first and second line, that helped it from appearing immediatly, but i'm still not able to type anything after...
Please, any help would be good.
Thank you very much.