Program Harga BBM
#include <iostream>
using namespace std;
int main() {
int i, premium, pertamax, biosolar;
cout<<"---------------------------------------------------------"<<endl;
cout<<"| L\t|\t"<<"premium\t|\t"<<"pertamax|"<<" biosolar\t|"<<endl;
cout<<"---------------------------------------------------------"<<endl;
for(i=1;i<=100;i++){
premium=7400*i;
pertamax=8600*i;
biosolar=6900*i;
cout<<"| "<<i<<"\t|\t"<<premium<<"\t|\t"<<pertamax<<"\t|\t"<<biosolar<<"\t|"<<endl;
}
cout<<"---------------------------------------------------------"<<endl;
return 0;
}
using namespace std;
int main() {
int i, premium, pertamax, biosolar;
cout<<"---------------------------------------------------------"<<endl;
cout<<"| L\t|\t"<<"premium\t|\t"<<"pertamax|"<<" biosolar\t|"<<endl;
cout<<"---------------------------------------------------------"<<endl;
for(i=1;i<=100;i++){
premium=7400*i;
pertamax=8600*i;
biosolar=6900*i;
cout<<"| "<<i<<"\t|\t"<<premium<<"\t|\t"<<pertamax<<"\t|\t"<<biosolar<<"\t|"<<endl;
}
cout<<"---------------------------------------------------------"<<endl;
return 0;
}
Comments
Post a Comment
-Berkomentarlah yang baik dan rapi.
-Menggunakan link aktif akan dihapus.