Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C Programming (http://www.velocityreviews.com/forums/f42-c-programming.html)
-   -   Re: How to arrange some numbers (http://www.velocityreviews.com/forums/t958697-re-how-to-arrange-some-numbers.html)

Mark Bluemel 03-15-2013 04:14 PM

Re: How to arrange some numbers
 
On 15/03/2013 16:02, paskali wrote:
> Hi, a simple question:
> i want to arrange some int numbers; i want to store them
> in an array and then print them on the screen.
>
> Look below:
>
> int numbers[10], arranged[10], i;
> puts("Insert 10 int numbers");
> for(i = 0; i <= 9; i ++, scanf("%d", &numbers[i]));
> ?
> for(i = 0; i <= 9; i ++, printf("/n%d", arranged[i]));
>
> I insert: 10 7 45 678 0 34 6 1 4 3
> I should see on the screen: 0 1 3 4 6 7 10 34 45 678
> Simple. Help me to replace question mark.


If you don't like the xkcd suggestions,
<http://lmgtfy.com/?q=sorting+algorithm>




All times are GMT. The time now is 11:56 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.