Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Khisby Al Ghofari
- //06.2017.1.06852
- //Kelas B
- //Shorting Array ASC
- #include <iostream>
- using namespace std;
- int main()
- {
- int a[5] = {1234,4,5,60,17};
- for (int e=0;e<5;e++){
- for (int c=0;c<5;c++){
- int d = a[c];
- if(a[c]>a[c+1]){
- a[c] = a[c+1];
- a[c+1] = d;
- }
- }
- }
- for(int b=0;b<5;b++){
- cout << a[b] << ",";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement