Menghitung dengan Modularisasi C++

Tuesday, March 29, 2011 7:54 AM by Computer and Programming
#include<conio.h>
#include<iostream.h>

void Hitung_SPPV1(long s){
    long SS1;
    SS1 = 42500*s;
    cout << " \n\nSPP Variabel Anda = "<< SS1 << "\n"; }
void Hitung_SPPV2(long s){
    long SD3;
    SD3 = 40000*s;
    cout << " \n\nSPP Variabel Anda = "<< SD3 << "\n"; }


main(){
float s;
int n;
char jawab (1) ;
awal :
cout<< "\n\tMenghitung SPP Variabel ";
cout<< "\n\nJurusan yang Anda ambil" << endl;
cout<< "\n\n1= D3 MI/TI  " << endl;
cout<< "\n\n2= S1 SI/TI  " << endl;
cout<< "\n\nMasukkan jml sks yang Anda ambil = "; cin>>s;
cout<< "\n\nMasukkan pilihan \n\n1 = SPP Variabel D3 \n\n2 = SPP Variabel S1 : ";
        cin>>n;
if
(n==1)
Hitung_SPPV2(s);
else if
(n==2)
Hitung_SPPV1(s);
else
cout << "\n\nSalah Tombol ";
cout <<"\n\n ingin transaksi yang lain? (Y/T)";cin >> jawab ;
if (jawab=='Y'||jawab=='T')
{
clrscr ();
goto awal;
}}

0 Response to "Menghitung dengan Modularisasi C++"

Post a Comment