daftar harga BBM dari premium,partamax dan solar perliternya.
kode c++:
#include <iostream>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char** argv) {
int premium= 6950;
int partamax=8450;
int solar=5650;
cout<<"|liter|"<<"\t"<<"|premium|"<<"\t"<<"|partamax|"<<"\t"<<"|solar|"<<endl;
cout<<"================================================"<<endl;
for(int i=1;i<=50;i++){
cout<<"|"<<i<<"\t|"<<premium*i<<"\t|\t|"<<partamax*i<<"\t|\t|"<<solar*i<<"|"<<endl;
}
return 0;
}
berikut kode c++ beserta outputnya saat di jalankan menggunakan c++:
0 comments:
Post a Comment