Some problem solving programming challenges, i have solved. Not all are here, but started adding them slowly.
This project is maintained by chankruze
You have six bowls of Rice Krispies in front of you, and they make different noises when you pour milk over them based on the total number of Rice Krispies in each bowl.
If a bowl has a number of Rice Krispies that is divisible by 3, it will make a Pop sound. If it is not divisible by 3 but is odd it will make a Snap sound. If it is not divisible by 3, but it is even, it will make a Crackle sound.
Based on the quantities in each bowl, output the noise that they make.
You receive 6 integers and each integer represents the number of Rice Krispies in your bowls.
You should output a string with the sounds made by each bowl separated by spaces in the order that they were input.
18
5
100
25
40
24
Pop Snap Crackle Snap Crackle Pop
Each number divisible by 3 makes a pop sound. If not, the even numbers produce a Crackle, and the odd numbers produce a Snap.
Language | Solution |
---|---|
C | not available |
CPP | not available |
C# | not available |
Python | available |
Java | not available |
Ruby | not available |
Swift | not available |