Computer Science, asked by Jananikannanejf3442, 6 months ago

Write an algorithm to print the first 20 odd numbers  in ascending order​

Answers

Answered by shreyash7121
3

Segregate Even and Odd numbers

Given an array A[], write a function that segregates even and odd numbers. The functions should put all even numbers first, and then odd numbers.

Example:

Input = {12, 34, 45, 9, 8, 90, 3}

Output = {12, 34, 8, 90, 45, 9, 3}

In the output, the order of numbers can be changed, i.e., in the above example, 34 can come before 12 and 3 can come before 9.

my friend make me as brainliest. . °°°°

Answered by sahuharsh182
0

\red{ANSWER}[tex]

Input : arr[] = {1, 2, 3, 5, 4, 7, 10}

Output : arr[] = {7, 5, 3, 1, 2, 4, 10}

Input : arr[] = {0, 4, 5, 3, 7, 2, 1}

Output : arr[] = {7, 5, 3, 1, 0, 2, 4}

Similar questions