Menggunakan Program C++
#include <cstdlib>
#include <iostream>
#include <math.h>
using namespace std;
int main(int argc, char *argv[])
{
int a,b,c,d,bersih,pokok,pajak;
int pendapatan,beban;
int laba_usaha,laba_kotor,laba_sebelum_pajak,laba_bersih;
cout<<"|====================================================|\n";
cout<<"| |\n";
cout<<"| Program Untuk Mencari Laba Usaha |\n";
cout<<"| |\n";
cout<<"|====================================================|\n";
cout<<"| Mencari Pendapatan |\n";
cout<<"|----------------------------------------------------|\n";
cout<<"| Masukkan pendapatan usaha : ";cin>>a;
cout<<"| Masukkan pendapatan di luar usaha : ";cin>>b;
pendapatan=a+b;
cout<<"| Jumlah pendapatan usaha : "<<pendapatan<<"\n";
cout<<"|----------------------------------------------------|\n";
cout<<"| Mencari Beban |\n";
cout<<"|----------------------------------------------------|\n";
cout<<"| Masukkan beban usaha \t\t: ";cin>>c;
cout<<"| Masukkan beban di luar usaha : ";cin>>d;
beban=c+d;
cout<<"| Jumlah beban \t\t\t: "<<beban<<"\n";
cout<<"|----------------------------------------------------|\n";
cout<<"| Mencari Laba |\n";
cout<<"|----------------------------------------------------|\n";
cout<<"| Masukkan penjualan bersih : ";cin>>bersih;
cout<<"| Masukkan harga pokok \t: ";cin>>pokok;
cout<<"| Masukkan pajak \t\t: ";cin>>pajak;
cout<<"|----------------------------------------------------|\n";
cout<<"| Hasil Laba |\n";
cout<<"|----------------------------------------------------|\n";
laba_kotor=bersih-pokok;
cout<<"| Laba Kotor \t\t: "<<laba_kotor<<"\n";
laba_usaha=laba_kotor-c;
cout<<"| Laba Usaha \t\t: "<<laba_usaha<<"\n";
laba_sebelum_pajak=laba_usaha+(b-d);
cout<<"| Laba Sebelum Usaha : "<<laba_sebelum_pajak<<"\n";
laba_bersih=laba_sebelum_pajak-(pajak*15/100);
cout<<"| Laba Bersih \t\t: "<<laba_bersih<<"\n";
cout<<"|====================================================|\n";
system("pause");
return 0;
}
Tampilan#include <iostream>
#include <math.h>
using namespace std;
int main(int argc, char *argv[])
{
int a,b,c,d,bersih,pokok,pajak;
int pendapatan,beban;
int laba_usaha,laba_kotor,laba_sebelum_pajak,laba_bersih;
cout<<"|====================================================|\n";
cout<<"| |\n";
cout<<"| Program Untuk Mencari Laba Usaha |\n";
cout<<"| |\n";
cout<<"|====================================================|\n";
cout<<"| Mencari Pendapatan |\n";
cout<<"|----------------------------------------------------|\n";
cout<<"| Masukkan pendapatan usaha : ";cin>>a;
cout<<"| Masukkan pendapatan di luar usaha : ";cin>>b;
pendapatan=a+b;
cout<<"| Jumlah pendapatan usaha : "<<pendapatan<<"\n";
cout<<"|----------------------------------------------------|\n";
cout<<"| Mencari Beban |\n";
cout<<"|----------------------------------------------------|\n";
cout<<"| Masukkan beban usaha \t\t: ";cin>>c;
cout<<"| Masukkan beban di luar usaha : ";cin>>d;
beban=c+d;
cout<<"| Jumlah beban \t\t\t: "<<beban<<"\n";
cout<<"|----------------------------------------------------|\n";
cout<<"| Mencari Laba |\n";
cout<<"|----------------------------------------------------|\n";
cout<<"| Masukkan penjualan bersih : ";cin>>bersih;
cout<<"| Masukkan harga pokok \t: ";cin>>pokok;
cout<<"| Masukkan pajak \t\t: ";cin>>pajak;
cout<<"|----------------------------------------------------|\n";
cout<<"| Hasil Laba |\n";
cout<<"|----------------------------------------------------|\n";
laba_kotor=bersih-pokok;
cout<<"| Laba Kotor \t\t: "<<laba_kotor<<"\n";
laba_usaha=laba_kotor-c;
cout<<"| Laba Usaha \t\t: "<<laba_usaha<<"\n";
laba_sebelum_pajak=laba_usaha+(b-d);
cout<<"| Laba Sebelum Usaha : "<<laba_sebelum_pajak<<"\n";
laba_bersih=laba_sebelum_pajak-(pajak*15/100);
cout<<"| Laba Bersih \t\t: "<<laba_bersih<<"\n";
cout<<"|====================================================|\n";
system("pause");
return 0;
}