Questions: 1 978

Answers by our Experts: 1 850

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

1. Visibly Divisible

by CodeChum Admin

Do you still know what being divisible by a certain number means? In case you forgot, being divisible means that the number is capable of being divided by another number without a remainder. With this knowledge, you can surely solve this problem!


Instructions:

  1. Input one integer.
  2. Make a conditional statement that contains the following conditions:
  3. If the integer is only divisible by 3, print "Divisible by 3"
  4. If the integer is only divisible by 4, print "Divisible by 4"
  5. If the integer is divisible by both 3 and 4, print "Divisible by 3 and 4"

Input


1. An integer

Output

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

The second line contains the appropriate message.

Enter·n:·6
Divisible·by·3

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


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


The Positive Ones

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 outputted values and print out the result.


Go and search for the positive ones among these four!


Input


1. First number

2. Second number

3. Third number

4. Fourth number

Output

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

The last line contains the total count of all the positive numbers.

Enter·the·first·number:·2
Enter·the·second·number:·-4
Enter·the·third·number:·3.6
Enter·the·fourth·number:·1
Count·of·positives·=·3





3. A linked list is a sequence of data structures, which are connected via links. Write a complete C program to perform the following on a Circular Doubly Linked List (CDLL).





a. Get a number n (1-9) from user and create CDLL with n nodes, which contains the numbers (1, 2, .. n) as the data in the nodes.






b. Display the elements of CDLL.






c. Insert another node (data = 0) as the head of CDLL. Display the elements of CDLL.






d. Convert the CDLL into a DLL.






e. Remove the second node (head->next) from the DLL.






f. Display the elements of DLL in reverse order.

2. Array is the simplest data structure where each data element can be randomly accessed by using its index number. Write a complete C program to create an array and perform the following, using functions.



a. Create an array to store some characters.



b. Get a word (which contains lower case letters only) from the user and store the letters in the array according to the order of letters.



(Ex: If the user Input = campus; Array = ‘c’ ‘a’ ‘m’ ‘p’ ‘u’ ‘s’)



c. Display the elements of the array.



d. Add uppercase letters (A, B, C, …) in between each letter in the array. Then your array length become double. Display the elements of the array.



(Ex: If the Array = ‘c’ ‘a’ ‘m’ ‘p’ ‘u’ ‘s’; After inserting numbers, the array = A c B a C m D p



E u F s)



e. Remove all the lower case letters from the array. Then your array will shrink back to the half size. Display the elements of the array.



(Ex: If the array = A c B a C m D p E u F s; then array = A B C D E F)



f. Display the array again in reverse order.






LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS