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

I'm really fond of even numbers, you know? That's why I'll be letting you make another even number problem yet again. This time, you need to print from a range of two inputted numbers, n1 and n2 (inclusive), all the even numbers from n2 down to n1, in descending order.

How about that?


Input

A line containing two integers separated by a space.


3·10

Output

Multiple lines containing an integer.


10
8
6
4

The greatest common divisor, also known as GCD, is the greatest number that will, without a remainder, fully divide a pair of integers.


Now, I want you to make a program that will accept two integers and with the use of loops, print out their GCD. Make good use of conditional statements as well.

Off you go!


Input

A line containing two integers separated by a space.


6·9

Output

A line containing an integer.


3

For those of you who may not now, a factorial is a product of multiplying from 1 until the number. Now, you must make a program that will accept an integer and then print out its factorial using loops.

Are you up for this task?


Instructions:

  1. Input a positive integer.
  2. Using a for() loop, generate the factorial value of the integer and print out the result.
  3. Tip #1: Factorials work like this: Factorial of 5 = 1 * 2 * 3 * 4 * 5
  4. Tip #2: There's a special case in factorials. The factorial of 0 is 1.

Input

A line containing an integer.


5

Output

A line containing an integer.


120

Write a function that categorizes negative and positive numbers of a given innial array into two separate arrays with sufficient allocated array space. Write the main program using the upper function in two cases:

The input array is a static array with the value of the given elements.

The input array is a dynamic array with the value of elements entered from the keyboard

Displays two arrays of results to the screen.



In Java, Write a program (in array) to take a number as input then display whether the number is equilibrium number or not.

Hint: A number will be called as equilibrium if the sum of its factors is equal to sum of its digits.


Defines a function that saves elements of a real number array in the opposite direction, declaring the function as void Reverse (double arr[], const int size, double*& rev). Write the main program using the upper function.



Write a function that sums each pair of elements of 2 arrays (plus correspondingly by index), resulting in a third array. Arrays have the same number of elements. Write the main program using the upper function and display the results to the screen


Write a function that saves even numbers of an innuation array foreground to another with sufficiently distributed array space. Write the main program using that function in 2 cases:

The input array is the static array with the given elements

The input array is a dynamic array with the number of elements and elements imported from the keyboard

Displays the resulting array to the screen


Suppose N is a decimal number, where N represents the last 4 digits of your student

id.

i) Convert N to binary.

ii) Convert N to hexadecimal


LATEST TUTORIALS
APPROVED BY CLIENTS