5. String[1] Check
by CodeChum Admin
As long as you haven't forgotten about indexing, you'll be just fine.
Instructions
Input three strings in different lines.
Print out "Same" if all of their 2nd characters are the same, else print out "Not the Same".
Input
Three lines containing a string on each.
Cry
Priest
Fry
Output
A line containing a string.
Same
3. Sum Cubes
by CodeChum Admin
The square of an integer refers to the result of multiplying the integer with itself once. While the cube of an integer refers to the result of multiplying the integer with itself twice. As long as you know that, you could easily solve this!
Instructions:
Input three integers and compute the cubes of each of them.
Check if the sum of the cubes are positive. If it is, print out "Positive", and if not, print out "Negative".
Instructions
Input three integers (negative, positive, or zero) and compute the cubes of each of them.
Check if the sum of the cubes are positive. If so, print out "Positive", and if not, print out "Negative".
Input
A line containing three integers separated by a space.
1 2 3
Output
A line containing a string.
Positive
Hey, I hope you are well.
Can you explain me the conversion from for loop to while loop vice versa in Python and Java? (As well as giving the examples of Recursive Function or Fruitful Functions)
The electoral petition of 2021 was aimed at determining the winner of the 2020 election. The rule is that the winner of an election in Ghana must obtain at least 50% +1 of the valid votes cast. a. Explain the concept of function in C++
b. Declare a function called Greatest, your function should have five arguments 3 i. The two names of the presidential candidates with the most votes ii. Total number of votes for each of them. iii. Total valid votes cast.
c. Your function should declare that candidate that had at least 50%+1 of the valid votes cast as winner.
d. Explain the logic behind the code