c++ if help

Hello,

I am making my first C++ Visual Studio forms program, wich will be a program that will give you a "if" task, and you should solve it. So far I've made 6 questions, but I'm out of ideas. Could anyone help me, giving some simple "if" tasks? I will post what questions I've made so far. Would appreciate something like I did.
Thanks!

1
2
3
4
5
6
7
8
9
10
11
int x;
int y;
x = c;
y = a + 2;
if (y + b > 2 * c)
x = a * b + c;
else x = a % b * c;
if (y > x)
x = x + 7;
else x = y * c + 2;
return x;


1
2
3
4
5
int x;
if (b / a < a)
x = (b % a) + (b / a);
else x = b / a;
return x;


1
2
3
4
5
6
7
int x;
x = a;
if (x < b)
x = b;
else if (x < c)
x = c;
return x;
Topic archived. No new replies allowed.