0
Could some help me about this question
You have a lottery ticket, with ints a, b, and c on it. If the numbers are all different from each other, the result is 0. If all of the numbers are the same, the result is 20. If two of the numbers are the same, the result is 10. * Example: a. Input:a=1,b=2,c=3 Output: 0 b. Input: a = 2, b = 2, c = 2 Output: 20 c. Input: a = 1, b = 1, c = 2 Output: 10
2 Antworten
+ 3
Be like bill. show your attempt.
0
Your problem is simple you need to use if esle conditions
First take three input if u want to take numbers from user than use scanf or u can define like this
int a=1,b=2 ,c=3;
Then write conditions
If((a==b)&&(a==c)&&(b==c) )
Result is 20
If ((a==b ) ||(a==c)) ||(b==c)
print("two number are same")