answersLogoWhite

0

AnswerIf A=10, B=2...

Then the algoritm is :-

STEP1 : START.

STEP2 : A=10.

STEP3 : B=02.

STEP4 : C=A-B.

STEP5 : PRINT C.

STEP6 : STOP.

AnswerYou cannot print every even number in descending order, because there is no greatest even number. Or you want something like this:

infinity

infinity-2

infinity-4

Answerstep 1: start

step 2: Input N

step 3: If N<=1, go to step 5

step 4: if N%2=0, Print N

N=N-1, go to step 3

step 5: End

User Avatar

Wiki User

12y ago

Still curious? Ask our experts.

Chat with our AI personalities

RafaRafa
There's no fun in playing it safe. Why not try something a little unhinged?
Chat with Rafa
JordanJordan
Looking for a career mentor? I've seen my fair share of shake-ups.
Chat with Jordan
ViviVivi
Your ride-or-die bestie who's seen you through every high and low.
Chat with Vivi
More answers

write an algorithm to print first N even numbers

User Avatar

Wiki User

13y ago
User Avatar
User Avatar

Mahal T

Lvl 1
3y ago
Super

Add your answer:

Earn +20 pts
Q: Write a algorithm to print all even numbers in descending order?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What does descending mean in maths?

In Maths, we often talk about ascending and descending order. Ascending order is writing numbers from smallest to largest. Descending order is writing numbers from largest to smallest.


In a selection sort when changing from ascending to descending order only---------- modifications need to be made to the algorithm?

Change every "&lt;" to "&gt;" and "&gt;" to "&lt;" .


Sort the array of integers in Descending order?

Make use of Java's robust library: // filled with various ints int[] a; // temporary variable for swapping values int temp; // sort with fast, built-in algorithm java.util.Arrays.sort(a); // reverse the array for( int i = 0; i &lt; a.length/2; ++i ) { temp = a[i]; a[i] = a[a.length - i - 1]; a[a.length - i - 1] = temp; } Obviously, if you're concerned with execution speed you could write your own sort method which would sort into descending order instead of ascending order (perhaps by modifying Java's sort algorithm).


What is use of sorting algorithm?

sorting means arranging a list of numbers or elements in an order (ascending or descending).


Algorithm and flow chart of the program for ascending and descending order of numbers?

Use a looping structure. The first step initialises a loop control variable, n, to zero. You then begin the loop by processing the nth element from the array (the process may be a simple print statement). You then increment n. Finally, you test the value of n; if it is less than 10 you start a new iteration of the loop, otherwise you proceed to the end of the flowchart.