Hello, I need some help figuring out which errors are syntax errors in this. Compared to what I started with this has come a long way but there are still some in there that I am having trouble spotting. I do know that they if statements are incorrect, i'm just not sure how to properly fix them.

#include <iostream>

using namespace std;

    int main ()
    int a, b;
    bool found;
    cout << "Enter two integers:" << endl;
    cin >> a >> b;
    if (a > a*b && 10 < b);
    found = 2 * a > b;
    found = 2 * a < b;
if found
a = 3;
c = 15;
if b
    b = 0;
    a = 1;
    system ("pause");
    return 0;
7 Years
Discussion Span
Last Post by Fbody

on line 19 it should be if (found) . the same applies to line 22. also why is found a bool?

what are you trying to do with this found = 2 * a > b; ?

Edited by NathanOliver: n/a


Not sure, it's what it started out as. I'm switching it I just hadn't yet


Your formatting isn't very good, it makes it very difficult to follow what you are trying to do.

What exactly is this program supposed to do?

Why do you have assignments formatted like this?

found = 2 * a > b;

What are you hoping this will accomplish?

Edited by Fbody: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.