Assalamu’alaikum w.w.,Pada kesempatan ini saya akan memposting Program dari materi ARRAY , program ini akan dibuat dalam bentuk C++ . Program yang akan di buat yaitu : Tentang : Programming No.3 (Halaman 414).
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 : integer
Deskripsi :
Max <--- Input
for (i=1;i<=max;i++)then
write("Masukkan Data Ke- 'I'")
for(i=1;i<=max;i++)then
write('data[1]')
for(i=1;i<=max;i++)then
for(j=1;j<=max;j++)then
if(data[i]>data[j])then
write('temp=data[i])
data[i] <--- data[j];
data[j] <--- temp;
Program C++ yang Menggunakan Aplikasi Dev C++ :
#include <iostream>
#include <cstdlib>
/* 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 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;
}
Jumat, 03 Juni 2016
Summary Of Hospital Revenue (Halaman 419)
![](https://3.bp.blogspot.com/-lRIX4aOkuBA/VpKL0IOUs9I/AAAAAAAAAjg/6sTalmltI-Q/s1600/author.png)
Unknown / Author & Editor
Has laoreet percipitur ad. Vide interesset in mei, no his legimus verterem. Et nostrum imperdiet appellantur usu, mnesarchum referrentur id vim.
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar