Analisis :You will need separate arrays to hold the revenue table, the unit totals (row sums)and the hospital quarterly totals (column sums).Algoritma :Deklarasi :I, j, max, temp : integerDeskripsi :Max <--- Inputfor (i=1;i<=max;i++)thenwrite("Masukkan Data Ke- 'I'")for(i=1;i<=max;i++)thenwrite('data[1]')for(i=1;i<=max;i++)thenfor(j=1;j<=max;j++)thenif(data[i]>data[j])thenwrite('temp=data[i])data[i] <--- data[j];data[j] <--- temp;#include <iostream>#include <cstdlib>using namespace std;int main(int argc, char** argv) {int i, j, max, temp;int data[10];cout<<"\t\t\t++++ Summary of Hospital Revenue ++++"<<endl<<endl;cout<<"Masukkan Banyak Data : ";cin>>max;for(i=1;i<=max;i++){cout<<"\nMasukkan Data Ke-"<<i<<" ; ";cin>>data[i];}cout<<"\nData Awal : ";for(i=1;i<=max;i++){cout<<data[i]<<" ";}for(i=1;i<=max;i++){for(j=1;j<=max;j++){if(data[i]>data[j]){temp=data[i];data[i]=data[j];data[j]=temp;}}}return 0;}
Breaking News
Jumat, 06 Mei 2016
halaman 419
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar