Jan-01-2020, 12:48 PM

how to make a program if it met with certain multiples of these numbers will produce a different output

example: I have numbers 1 - 20 these numbers will have the same output except 2, 4, 6, 8, 10, 12, 14, 16, 18, 20 plus the string in front to distinguish that they are multiples of 2 besides their multiples of 2 only has regular integer output.

output:

1

2 different

3

4 different

5

6 different

7

8 different

9

10 different

etc

how do you make the program?

I've tried using a for loop and range function with an if statement but it still produces output that doesn't match what I want

example: I have numbers 1 - 20 these numbers will have the same output except 2, 4, 6, 8, 10, 12, 14, 16, 18, 20 plus the string in front to distinguish that they are multiples of 2 besides their multiples of 2 only has regular integer output.

output:

1

2 different

3

4 different

5

6 different

7

8 different

9

10 different

etc

how do you make the program?

I've tried using a for loop and range function with an if statement but it still produces output that doesn't match what I want