#include <iostream.h>
#include <stdio.h>
#include<conio.h>
void main()
{
int arr[100],i,j,no,temp;
clrscr();
cout<<"Didin Aryo Susilo "<<endl;
cout<<"NIM : 14104410080 "<<endl;
cout<<""<<endl;
printf("\Jumlah Elemen Data yg Di masukkan: ");
scanf("%d", &no);
for(i=0;i<no;i++)
{
printf("\n Enter Elemen Data %d: ", i+1);
scanf("%d",&arr[i]);
}
for(i=0;i<no;i++)
{
for(j=i;j<no;j++)
{
if(arr[i] < arr[j]){
temp=arr[i];
arr[i]=arr[j];
arr[j]=temp;
Next
« Prev Post
« Prev Post
Previous
Next Post »
Next Post »
Subscribe to:
Post Comments (Atom)
EmoticonEmoticon