Questions: 5 831

Answers by our Experts: 5 728

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

6. Largest Digit

by CodeChum Admin

This one is a bit tricky. You're going to have to isolate each digit of the integer to determine which one is the largest, so good luck!


Instructions:

  1. Input a 3-digit integer.
  2. Print the largest digit in the integer.
  3. Tip #1: Use % 10 to get the rightmost digit. For example, if you do 412 % 10, then the result would be the rightmost digit, which is 2.
  4. Tip #2: On the other hand, use / 10 to remove the rightmost digit. For example, if you do 412 / 10, then the result would be 41.
  5. Tip #3: You'd have to repeat Tip #1 and Tip #2 three times for this problem because the input is a 3-digit integer.

Instructions

  1. Input one 3-digit integer.
  2. Print the largest digit in the integer. (Hint: use % 10 to get the rightmost digit and / 10 to remove it)

Input

A line containing a three-digit integer.


173

Output

A line containing a single-digit integer


7

5. Operation: Operation

by CodeChum Admin

You have been cordially invited to partake in Operation: Operation. Your mission, should you choose to accept it, is to take the two numbers and the operator given then perform the operation successfully.


Instructions:

  1. Input one number (integer or decimal), an operator (+, -, *, /), and another number (integer or decimal).
  2. Print the result of the operation between the two numbers, up to 2 decimal places.

Instructions

  1. Input one number (integer or decimal), an operator (+, -, *, /), and another number.
  2. Print the result of the operation between the two numbers, up to 2 decimal places.

Input

The first line contains the first number.

The second line contains the operator.

The third line contains the second number.

5
+
0.70

Output

A line containing a decimal/float containing two decimal places.


5.70

4. Length Comparison Redux

by CodeChum Admin

The first time around we did this was a bit simple. Let's kick it up a notch don't you think?


Instructions:

  1. Input two strings in different lines.
  2. If the 1st string is longer than the 2nd string, print "First". If the 2nd string is longer than the 1st string, print "Second". But if both strings have the same length, print "Equal".

Instructions

  1. Input two strings in different lines.
  2. If the 1st string is longer than the 2nd string, print "First". If the 2nd string is longer than the 1st string, print "Second". But if both strings have the same length, print "Equal".

Input

Two lines containing a string on each.


VeryLongText
ShortText

Output

A line containing a string.


First

3. Are Strings Created Equally?

by CodeChum Admin

Do you believe in doppelgangers? Well they are very much possible with strings! Check if the two given strings are the same or not.


Instructions:

  1. Input two strings in different lines (one each line).
  2. Print out the strings in one line, separate them with a \.
  3. Check whether the two strings are equal, print out "Equal" if they are.

Instructions

  1. Input two strings in different lines (one each line).
  2. Print out the strings in one line, separate them with a \.
  3. Check whether the two strings are equal, print out "Equal" if they are.

Input

Two lines containing a string on each.


hello
hello

Output

The first line contains the two inputted strings separated by a \.

The second line contains a string result.

hello\hello
Equal

2. Two is Greater Than One

by CodeChum Admin

They say that the one in first place is always greater than the one in the second and third place. Are they always right?


Instructions:

  1. Input three integers in different lines (one each line).
  2. Print out the integers in one line.
  3. If the 1st integer is greater than or equal to both the 2nd integer and the 3rd integer, print "Yes".

Instructions

  1. Input three integers in different lines (one each line).
  2. Print out the integers in one line.
  3. If the 1st integer is greater than or equal to both the 2nd integer and the 3rd integer, print "Yes".

Input

Three lines containing an integer on each.


3
2
1

Output

The first line contains all the three inputted integers.

The second line contains a string which is the result.

3·2·1
Yes

Replacing Characters of Sentence


You are given a string


S. Write a program to replace each letter of the string with the next letter that comes in the English alphabet.


Note: Ensure that while replacing the letters, uppercase should be replaced with uppercase letters, and lowercase should be replaced with lowercase letters.


Input


The first line of input is a string.


Explanation


In the given example,


Hello World.


If we replace each letter with the letter that comes next in the English alphabet,


H becomes I, e becomes f and so on ... So, the output should be Ifmmp Xpsme.


Sample Input 1

Hello World

Sample Output 1

Ifmmp Xpsme

Sample Input 2

Something is better than Nothing

Sample Output 2

Tpnfuijoh jt cfuufs uibo Opuijoh


Do you believe in doppelgangers? Well they are very much possible with strings! Check if the two given strings are the same or not.


Instructions:

  1. Input two strings in different lines (one each line).
  2. Print out the strings in one line, separate them with a \.
  3. Check whether the two strings are equal, print out "Equal" if they are.

Instructions

  1. Input two strings in different lines (one each line).
  2. Print out the strings in one line, separate them with a \.
  3. Check whether the two strings are equal, print out "Equal" if they are.

Input

Two lines containing a string on each.


hello
hello

Output

The first line contains the two inputted strings separated by a \.

The second line contains a string result.

hello\hello
Equal
Digit 9


You are given


N as input. Write a program to print the pattern of 2*N - 1 rows using an asterisk(*) as shown below.Note: There is a space after each asterisk * character.Input

The first line of input is an integer


N.Explanation

In the given example,




sample input is 4


the output should be like this...

* * * *
*     *
*     *
* * * *
      *
      *
* * * *

They say that the one in first place is always greater than the one in the second and third place. Are they always right?


Instructions:

  1. Input three integers in different lines (one each line).
  2. Print out the integers in one line.
  3. If the 1st integer is greater than or equal to both the 2nd integer and the 3rd integer, print "Yes".

Instructions

  1. Input three integers in different lines (one each line).
  2. Print out the integers in one line.
  3. If the 1st integer is greater than or equal to both the 2nd integer and the 3rd integer, print "Yes".

Input

Three lines containing an integer on each.

3
2
1

Output

The first line contains all the three inputted integers.

The second line contains a string which is the result.

3·2·1
Yes

4. Decimal x Decimal

by CodeChum Admin

Now that we're done with integers, we're moving on to decimals!


Instructions:

  1. Input three decimal numbers with only two decimal places in one line separated by spaces, store them inside variables.
  2. Multiply the 1st and 2nd decimal numbers, store the product.
  3. Divide the product of the 1st and 2nd decimal numbers with the 3rd decimal number, then print out the quotient with only two decimal places.

Instructions

  1. Input three decimal numbers with only two decimal places in one line separated by spaces, store them inside variables.
  2. Multiply the 1st and 2nd decimal numbers, store the product.
  3. Divide the product of the 1st and 2nd decimal numbers with the 3rd decimal number, then print out the quotient with only two decimal places.

Input

A line containing three decimal numbers with two decimal places separated by a space.


1.53·2.25·1.23

Output

A line containing the result with two decimal places.


2.80
LATEST TUTORIALS
APPROVED BY CLIENTS