Have an assignment and these two below I am not getting

Write a function called decide that will compare two integers and will return 0 if they are equal, 1 if the first number is greater and –1 if the first number is smaller.

Where do I even begin??

cout << 3 + 13/2 * 2 ;

What symbols would you have to add to this statement in order for the result to be 18 ( integer) ? DO NOT ADD ANY NEW NUMBERS

Write a function called decide that will compare two integers and will return 0 if they are equal, 1 if the first number is greater and –1 if the first number is smaller.

Where do I even begin??

cout << 3 + 13/2 * 2 ;

What symbols would you have to add to this statement in order for the result to be 18 ( integer) ? DO NOT ADD ANY NEW NUMBERS

Where do I even begin?? |

Well, it says WRITE a FUNCTION called DECIDE, that will RETURN a number and compares TWO INT values, so have you got as far as this?

`int` decide(`int` input1, `int` input2);

If you have not got this far, you need to go right back to the start and look up "What is a function?" in your notes.

Topic archived. No new replies allowed.