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

Odd-Even-inator

by聽CodeChum Admin

My friends are geeking out with this new device I invented. It checks if a number is even or odd! 馃く聽


Do you want to try it out?


Instructions:

  1. In the code editor, you are provided with a function that checks whether a number is even or odd.
  2. Your task is to ask the user for the number of integer, n, they want to input and then the actual n number values. For each of the number, check whether it is even or odd using the function provided for you.
  3. Make sure to print the correct, required message.

Input


1. Integer n

2. N integer values


Answers the question below:



1. What do you call the 1st array/index in two dimensional array?



2. What do you call the 2nd array/index in two dimensional array?



3. What is the output of the given code?



double[] sales = {12.5, 32.50, 16.90, 23, 45.68,


9, 10.5};



for(int i=0; i<sales.length; i++)



{ } System.out.print(sales.length);




4. What is the output of the given code?



double[][] sales = {



{12.5, 32.50}, (16.90, 23, 45.68}, {1, 2, 3, 4},


};



System.out.print(sales[2][1]);




5. What is the output of the given code?



double[][] sales = {



(12.5, 32.50), (16.90, 23, 45.68}, {1, 2, 3, 4),



}; System.out.print(sales[1][1]);




6.聽Negative Decimal Tally

by聽CodeChum Admin

We've been giving positive numbers too much attention lately, it's time to let negative numbers take the spotlight this time!


Instructions:

  1. Input four float numbers; they could be positive or negative.
  2. Only add all inputted negative numbers, and print its sum, up to 2 decimal place.
  3. Hint:聽The previous/latest topic is about if-else-elseif statements, but do we need one here?

Input


1. First decimal number

2. Second decimal number

3. Third decimal number

4. Fourth decimal number

Output

The first four lines will contain message prompts to input the four decimal numbers.

The last line contains the sum of all the inputted negative numbers, with 2 decimal places.

Enter路the路first路number:路-30.22
Enter路the路second路number:路10.5
Enter路the路third路number:路-2.2
Enter路the路fourth路number:路-1.8
Sum路of路all路negatives路=路-34.22

5.聽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.

Input


1. A three-digit integer

Output

The first line will contain a message prompt to input the 3-digit integer.

The last line contains the largest digit of the inputted integer.

Enter路a路3-digit路integer:路173
Largest路=路7

5.聽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.

Input


1. A three-digit integer

Output

The first line will contain a message prompt to input the 3-digit integer.

The last line contains the largest digit of the inputted integer.

Enter路a路3-digit路integer:路173
Largest路=路7

5.聽Float Galore

by聽CodeChum Admin

We've been dealing with integers too much, it's time for float to shine!


Instructions:

  1. Input five float numbers.
  2. Print out the float numbers in one line, separated by spaces, and make sure you only print up to 1 decimal place.
  3. Add the first four float numbers and check if their sum is greater than the fifth float number. Print out聽"Yes"聽if they are.

Input


1. First float number

2. Second float number

3. Third float number

4. Fourth float number

5. Fifth float number

Output

The first five lines will contain message prompts to input the five float numbers.

The next line contains the inputted float numbers.

The last line contains "Yes" if the condition is true.

Enter路the路first路number:路1.1
Enter路the路second路number:路1.2
Enter路the路third路number:路1.3
Enter路the路fourth路number:路1.4
Enter路the路fifth路number:路1.1
1.1路1.2路1.3路1.4路1.1
Yes

. Are Integers Created Equally?

by CodeChum Admin


It's time to find out if something is true or false. Let's test your capabilities by creating a program that checks if two integers are equal!




Instructions:


Input two integers in one line.

Print the two integers in one line, and separate them with a space.

Print a string message "Equal" on a new line, if both inputted integers are equal.

Input


1. First integer


2. Second integer


Output


The first two lines will contain message prompts to input the two integers.

The next line will contain the inputted integers.

The last line will contain a string which is the result, if the condition were true.


Enter路the路first路integer:路5

Enter路the路second路integer:路5

5路5

Equal


Input the gender of 10 students in the form of m, M or f, F. Display how many students are male and female. Use for loop and while loop.

Convert a ten digit number to a string following the rules

Andy has the word W and he wants to print the unique characters in the word in the order of their occurrence.write a program to help Andy print the unique characters as described above.


NOTE : consider lower and upper case letters as different


Input

The input is a single line containing the word W.


Output

The output should be a single line containing space separated characters.


Explanation

In the example, the word is MATHEMATICS

The unique characters in the given word are M, A, T, H, E, I, C, S, in the order of occurrence.so the output should be M A T H E I C S.


Sample Input1

MATHEMATICS

Sample Output1

M A T H E I C S


Sample Input2

banana

Sample Output2

b a n


LATEST TUTORIALS
APPROVED BY CLIENTS