# Ascending Numbers Help Only "C"

Printable View

• 10-12-2010
xcurialz
Ascending Numbers Help Only "C"
i have a problem in this 1 of my problem!!!!
can you solve this one for me!!!! or post here your program!!!!
only "C" please

here's my program!!:
Code:

```#include<stdio.h> #include<conio.h> int main(void) {     int array[10], t, x;             for (x=0; x<10; x++)     {         printf("Enter integer number:\n ");         scanf("%d", &array[x]);         }                 if(array[x] < array[x+1])                                                       t=array[x];                                       array[x]=array[x+1];                                       array[x+1]=t;                     printf("The integers in ascending order are : ");                 for (x=0;x<10;x++)         printf("%d\n", array[x]);                                     getch();             }```
Input is:
5 6 2 4 3 1 7 90 23 41 45 24
The correct Output is:
1 2 3 4 5 6 7 23 24 41 45 90
• 10-12-2010
User Name:
Yes!!! I could, but I don't spend my time doing other's homework!!! Bubble sort is extremely easy, use it.
• 10-13-2010
hk_mp5kpdw
Quote:

Originally Posted by xcurialz
only "C" please

So... you want C help but out of all the different boards you could have posted to you choose the C++ one? You do know there is a separate board for just C right? It would help to choose the right one to post in.
• 10-13-2010
Salem
Moved
• 10-13-2010
MWAAAHAAA
Quote:

Originally Posted by User Name:
Yes!!! I could, but I don't spend my time doing other's homework!!! Bubble sort is extremely easy, use it.

I think you're missing a bunch of exclamation marks at the end of your sentence!!!