you will need separate arrays to hold the revenue table, the unit totals(row sums) and the hospital quarterly totals (column sums).
dengan c++
#include <iostream>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace std;
int main(int argc, char** argv) {
int k, l, max, temp;
int data[10];
cout<<"\t------Summary of Hospital Revenue------- "<<endl;
cout<<"Masukan banyak data ";
cin>>max;
for(k=1;k<=max;k++){
cout<<"Masukan data ke-"<<k<<" ; ";
cin>>data[k];
}
cout<<"Data Awal : ";
for(k=1;k<=max;k++){
cout<<data[k]<<" ";
}
for(k=1;k<=max;k++){
for(l=1;l<=max;l++){
if(data[k]>data[l]){
temp=data[k];
data[k]=data[l];
data[k]=temp;
}
}
}
return 0;
}
ouputnya
algoritma
deklarasi
k,l max, temp (integer)
deskripsi:
max input
for(k=1;k<=max;k++)then
write("masukan data ke-k")
for(k=1;k<=max;k++)then
write("data[i])
for(k=1;k<=max;k++)then
for(l=1;l<=max;l++)then
if(data[k]>data[l])then
write("temp=data[k])
data[k] data[l];
data[l] tem;
untuk problem solving halam 538 di septian klik disini
untuk problem solving halam 541 di lala klik disini
Tidak ada komentar:
Posting Komentar