Print out the ratio max/min

Given three integers, print out the ratio max/min

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <iostream>
using namespace std;
int main(int x,int y,int z,int max,int min)


{
	if(x<=y && x<=z)
	{
		min=x;
		if(y<z)
			max=z;
		else
			max=y;
	}
	
	if (y<=x && y<=z)
	{
		min=y;
		if(x<z)
			max=z;
		else
			max=x;
	}
	
	if (z<=x && z<=y)
	{
		min=z;
		if(x<y)
			max=y;
		else
			max=x;
	}
	
}


My Dev++ App in error
int main(int x,int y,int z,int max,int min) ugh...that shouldn't even compile.

Anyways, if you are looking for an answer maybe you should ask a question. Otherwise I am not sure what you are looking for other than the fact you need to declare the variables inside the main function and then read in the values.
Topic archived. No new replies allowed.