by CodeChum Admin
There are different kinds of numbers, but among them all, the most commonly used numbers in our daily lives are those positive ones. So, I only want you to count all the positive numbers from the 4 inputted values and print out the result.
Go and search for the positive ones among these four!
Input
A line containing four numbers (may contain decimal places) separated by a space.
2·-4·3.6·1
Output
A line containing the total number of positive integers.
3
X is a normally distributed random variable with a mean of 60 and standard
deviation of 8. Find the probabilities indicated by using the table.
(a) P(X < 52)
(b) P(48 < X < 64)
(c) P(X > 57)
by CodeChum Admin
We've already tried comparing 3 numbers to see the largest among all, so let's try a more complicated mission where we locate where among the 5-digit integer is the largest one. There are only 4 possible cases for this mission:
Now, show me how far you've understood your lessons!
Input
A line containing a five-digit integer.
14632
Output
A line containing a string.
Middle
X is a normally distributed random variable with a mean of 60 and standard
deviation of 8. Find the probabilities indicated by using the table.
(a) P(X < 52)
(b) P(48 < X < 64)
(c) P(X > 57)
Is It You, Cody?
by CodeChum Admin
Can you identify if Cody's name is spelled right? If so, then make a program that accepts four one-letter strings separated by space and print "Correct" if the inputted strings, combined in order, spell the name Cody correctly. If not, print "Wrong".
It doesn't matter if it's in uppercase or lowercase, as long as it's spelled correctly, it's considered correct.
Now, will you take on this task?
Input
A line containing four one-letter strings separated by a space.
c·O·D·y
Output
A line containing a string.
Correct
Hand shakes
Input=5
Output=10
Input two integers in one line, separated by a space. The first integer shall represent the starting point, and the other, the ending point.
Print out all even numbers that are within the range of the starting and ending point. Also keep in mind that the starting and ending numbers are also included in your even number evaluation!
In a large region, there are 450 farmers. 250 pounds of farm beetroot, 110 pounds of farm yams, 75 pounds of farm radish, 45 pounds of farm beetroot and radish, 40 pounds of farm yams and radish, and 30 pounds of farm beetroot and yams Let B, Y, and R represent the farms that grow beets, yams, and radish, respectively.
Determine the number of farmers that farm beetroot, yams, and radish.
The Greater One
by CodeChum Admin
Let us now try comparing two numbers by letting the user input two different numbers and say "Greater" if the first inputted number is greater than the second one, and "Lesser" if it’s the other way around.
Let's go!
Input
A line containing two different numbers separated by a space.
1.2·1.02
Output
A line containing a string.
Greater
Print out all numbers from 1 to 100 that is divisible by 3, each in separate lines, using a for loop.