You are here:

C/C Language

Advertisement


Question
How to create a program that prints the numbers 1, 3, 2, 5, and 4 in descending order using the "for loop" in C language

Answer
Forget C language for a moment.
Given the same set of numbers, how do you do arrange them in ascending order.
Write down the steps you followed in English.
Once you are done, your algorithm is ready.

Post that algorithm here and we will convert it to C code.

C

All Answers


Answers by Expert:


Ask Experts

Volunteer


Narendra

Expertise

I can answer questions in C related to programming, data structures, pointers and file manipulation. I use Solaris for doing C code and if you have questions related to C programming on Solaris, I will be able to help better.

Experience

6.5

Organizations belong to
Sun Microsystems

Awards and Honors
Brain Bench Certified Expert C programmer.
Advanced System Software Certified

©2012 About.com, a part of The New York Times Company. All rights reserved.