boolean function

have 3 threshold values: 90, 80, 70; need to derive a function which determines if inputs are valid. the function takes 3 int inputs: a, b, c, and returns a Boolean true/false. the function should test that 100>a>b>c>0, again returning true/false. does my code meet the requirements.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
bool isValid(int a, int b, int c)
{
	if (Score1 <= 100 && Score1 >= 0)

		return 1;

	else if (Score2 <= 100 && Score2 >= 0) {

		return 1;
	}

	else if (Score3 <= 100 && Score3 >= 0) {

		return 1;
	}

	else

		return 0;
}

  
bool isValid( int a, int b, int c ) { return 100>a && a>b && b>c && c>0 ; }
thank buddy
Topic archived. No new replies allowed.