#include<stdio.h> void main() { int i, j, a, n, number[30]; printf("Enter the value of N \n"); scanf("%d", &n); printf("Enter the numbers \n"); for (i = 0; i < n; ++i) scanf("%d", &number[i]); for (i = 0; i < n; ++i) { for (j = i + 1; j < n; ++j) { if (number[i] > number[j]) { a = number[i]; number[i] = number[j]; number[j] = a; } } } printf("The numbers arranged in ascending order are given below \n"); for (i = 0; i < n; ++i) printf("%d\n", number[i]); }

4/10/2021 2:53:59 AM

Rajesh Dutta3 Answers

New Answer
Hot Today

Why is the output 1?
Which coding language is easy
What Exactly Are Algorithms?
Why can't I use JavaScript for solving code Coach problems in the community section?
Write a program that takes text input and output it by adding 3 stars
Why is it different for others?
Que era == en python?
When you go out to eat, you always tip 20% of the bill amount. But who’s got the time to calculate the right tip amount every ti
Hello everyone, can i ask what is the best code language for beginners? Just doing some advance learning for future purposes. Ty
how to add integer part of the decimal numbers by c language

Sololearn Inc.

4 Embarcadero Center, Suite 1455San Francisco, CA 94111

© 2021 Sololearn, Inc.

Send us a message