|
From: JTBaccarat <jtb...@ro...> - 2004-04-26 15:49:14
|
I am very new to coding and I am working through a novice textbook.
My programs never get past the "Enter an integer" stage. The DOS box =
opens
to enter the integers and then it closes.
Does anyone have any ideas how I can configure Dev-C++ to function =
properly?
A basic example is below.
Thanks,
Jamie
#include <iostream>
using namespace std;
int main()
{ // EXAMPLE 3.8 USING COMPOUND CONDITIONS
// Uses the compound conditions to find the minimum of three integers
int n1,n2,n3;
cout << "Enter three integers: ";
cin >> n1 >> n2 >> n3;
if (n1 <=3D n2 && n1 <=3D n3) cout << "Their minimum is " << n1 << =
endl;
if (n2 <=3D n1 && n2 <=3D n3) cout << "Their minimum is " << n2 << =
endl;
if (n3 <=3D n1 && n3 <=3D n2) cout << "Their minimum is " << n3 << =
endl;
cin.get();
return 0;
}
|