Hi
Your code will now compile, so you now can see your programs logic...
#include <iostream>
using namespace std;
int main()
{
int num1 , num2 , num3;
cout << "Please Enter Three Valid Integers Using The Keyboard\n";
cout << "enter interger 1\n";
cin >> num1;
cout << "enter interger 2\n";
cin >> num2;
cout << "enter interger 3\n";
cin >> num3;
//First IF statement
if ((num1 >= num2) && (num2 >= num3))
{
// We only come if above condition is met
// You need to read about logical operators
// We need to do something here...
std::cout << "First IF statement is met...\n" << std::endl;
}
else
{
// We end up here if the above condition is not met
int sum1;
sum1 = num1 + num2;
std::cout << "First IF statement is not met" << std::endl;
}
//Second IF statement
if ((num2 >= num1) && (num1 >= num3))
{
}
else
{
num2 + num1;
}
//Third IF statement
if ((num3 >= num1) && (num1 >= num2))
{
}
else
{
num3 + num1;
}
//Four IF statement
if ((num3 >= num2) && (num2 >= num1))
{
}
else
{
num3 + num2;
}
cout << " The Maximum Sum Of These Numbers Is: "<< num1 << num2 << num3 << endl;
system("pause");
return 0 ;
}
OK now work through the program & there are still some corrections to do
ziggystarman
Junior Poster in Training
79 posts since Sep 2010
Reputation Points: 23
Solved Threads: 5
Skill Endorsements: 0
Question Answered as of 2 Years Ago by
emanfman,
bignm,
ziggystarman
and 1 other