#include <iostream.h>
#include <conio.h>
#define Nmaks 3
void main() {
typedef float matriks[Nmaks][Nmaks];
int i,j;
float determinan, hasilbagidet;
matriks A,a;
char answer;
do
{
do
{
clrscr();
cout<<"DETERMINAN MATRIKS A : "<<endl<<endl;
cout<<"Masukkan Nilai Matriks A : "<<endl;
for(i=1;i<=2;i++)
{
for(j=1;j<=2;j++)
{
cout<<"A["<<i<<","<<j<<"] = ";
cin>>A[i][j];
}
}
clrscr();
cout<<endl;
//Proses Mencari Determinan Matriks A
determinan = (A[1][1] * A[2][2]) - (A[2][1] * A[1][2]);
}while (determinan == 0);
hasilbagidet = 1/determinan;
//mencari invers
a[1][1] = hasilbagidet * A[2][2];
a[1][2] = hasilbagidet * -A[1][2];
a[2][1] = hasilbagidet * -A[2][1];
a[2][2] = hasilbagidet * A[1][1];
clrscr();
//Output Matriks A
gotoxy(1,5);
cout<<"A = ";
for(i=1;i<=2;i++)
{
for(j=1;j<=2;j++)
{
gotoxy(2+4*j,2+2*i);
cout<<A[i][j];
}
}
gotoxy(1,8);
cout<<"Determinan Matriks A = "<<determinan;
cout<<endl;
//Output Invers Matriks A
gotoxy(1,10);
cout<<"Invers Matriks A : "<<endl;
gotoxy(2,15);
cout<<"A^-1 = ";
for(i=1;i<=2;i++)
{
for(j=1;j<=2;j++)
{
gotoxy(1+9*j,12+2*i);
cout<<a[i][j];
}
}
getch();
clrscr();
cout<<"== PROGRAM SELESAI =="<<endl<<endl;
cout<<"Mau Melakukan Perhitungan Lagi?? [Y/T] "; cin>>answer;
}
while ((answer == 'y') || (answer == 'Y'));
}
Sabtu, 25 Juni 2011
mencari rata-rata
#include <iostream.h> int main(){ int n; cout<<"Masukkan n : "; cin>>n; cout<<endl<<endl; int data[50]; float rata2,jumlah=0; for(int i=1;i<=n;i++){ cout<<"Masukkan data "<<i<<" : "; cin>>data[i]; if(data[i]%2==0) { //seleksi genap aje.... jumlah+=data[i]; rata2=jumlah/n; } } cout<<"\n\n\tRata-rata Genap adalah "<<jumlah<<":"<<n<<" = "<<rata2<<endl; return 0; }
contoh program sederhana
#include <iostream.h> #include <conio.h> void main() { float IP; clrscr(); cout<<"Masukkan Indeks prestasi anda:"; cin >> IP; if (IP>=0 && IP <=2.0) cout<<"Maksimum SKS yang boleh diambil= 10"<<endl; else if (IP>=2.01 && IP<=3.0) cout<<"Maksimum SKS yang boleh diambil= 20"<<endl; else if (IP>=3.01 && IP<=4.0) cout<<"Maksimum SKS yang boleh diambil= 25"<<endl; else cout<< "IP ilegal !!"<<endl; }
Kamis, 23 Juni 2011
Program Kalkulator Sederhana
#include <cstdlib>
#include <iostream>
#include <string.h>
#include <conio.h>
#include <math.h>
#include <windows.h>
using namespace std;
class hitung
{
private:
float num1,num2,a,b,c,d,e;
float hasil;
int pilih;
public:
void judul();
void masukan();
void proses();
void tampilan();
void pangkat();
void pangkat_n();
void akar2();
void xin();
void xos();
void xan();
};
void hitung::judul()
{
HANDLE hConsole;
hConsole = GetStdHandle (STD_OUTPUT_HANDLE);
SetConsoleTextAttribute
(hConsole, FOREGROUND_GREEN | FOREGROUND_INTENSITY);
cout<<” *=*=*=*=*=*=*=*=*=*=*=*=*=*= BY *=*=*=*=*=*=*=*=*=*=*=*=*=*=”<<endl;
cout<<” *=*=*=*=*=*=*=*=*=*=*=*=*= M. Muhafid *=*=*=*=*=*=*=*=**=*=*=*=*=”<<endl;
cout<<” *=*=*=*=*=*=*=*=*=*=*=*= 10018053 =*=*=*=*=*=*=*=*=*=*=*=*=\n”<<endl;
cout<<” *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=”<<endl;
cout<<” **=*=*=*=*=*=*=*=*= WELCOME *=*=*=*=*=*=*=*=*=*=”<<endl;
cout<<” **=*=*=*=*=*=*=*=*= KALKULATOR DIGITAL *=*=*=*=*=*=*=*=*=*=”<<endl;
cout<<” *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=\n”<<endl;
cout<<endl;
}
void hitung::masukan()
{
HANDLE hConsole;
hConsole = GetStdHandle (STD_OUTPUT_HANDLE);
SetConsoleTextAttribute
(hConsole, FOREGROUND_RED | FOREGROUND_INTENSITY);
cout<<” ================================================================\n”;
cout<<” ======= SILAHKAN MEMILIH OPERATOR YANG ANDA INGINKAN =======\n”;
cout<<” ================================================================\n”;
cout<<” ====================== 1. PERKALIAN ====================”;
cout<<endl;
cout<<” ====================== 2. PEMBAGIAN ====================”;
cout<<endl;
cout<<” ====================== 3. PENJUMLAHAN ====================”;
cout<<endl;
cout<<” ====================== 4. PENGURANGAN ====================”;
cout<<endl;
cout<<” ====================== 5. PANGKAT 2 ====================”;
cout<<endl;
cout<<” ====================== 6. PANGKAT n ====================”;
cout<<endl;
cout<<” ====================== 7. PERSEN (%) ====================”;
cout<<endl;
cout<<” ====================== 8. AKAR ====================”;
cout<<endl;
cout<<” ====================== 9. SIN ====================”;
cout<<endl;
cout<<” ====================== 10. COS ====================”;
cout<<endl;
cout<<” ====================== 11. TAN ====================\n”;
cout<<” ================================================================\n”;
SetConsoleTextAttribute
(hConsole, FOREGROUND_GREEN | FOREGROUND_INTENSITY);
cout<<” PILIHAN ANDA ADALAH : “ ;
cin>>pilih;
cout<<endl;
system(“cls”);
switch(pilih)
{
case 1:
HANDLE hConsole;
hConsole = GetStdHandle (STD_OUTPUT_HANDLE);
SetConsoleTextAttribute
(hConsole, FOREGROUND_BLUE | FOREGROUND_INTENSITY);
cout<<” *****************”<<endl;
cout<<” *** PERKALIAN ***”<<endl;
cout<<” *****************\n”<<endl;
cout<<”Masukkan nilai ke 1 :”;
cin>>num1;
cout<<”Masukkan nilai ke 2 :”;
cin>>num2;
break;
case 2:
cout<<”*****************”<<endl;
cout<<”*** PEMBAGIAN ***”<<endl;
cout<<”*****************”<<endl;
cout<<”Masukkan nilai ke 1 :”;
cin>>num1;
cout<<”Masukkan nilai ke 2 :”;
cin>>num2;
break;
case 3:
cout<<”*******************”<<endl;
cout<<”*** PENJUMLAHAN ***”<<endl;
cout<<”*******************”<<endl;
cout<<”Masukkan nilai ke 1 :”;
cin>>num1;
cout<<”Masukkan nilai ke 2 :”;
cin>>num2;
break;
case 4:
cout<<”*******************”<<endl;
cout<<”*** PENGURANGAN ***”<<endl;
cout<<”*******************”<<endl;
cout<<”Masukkan nilai ke 1 :”;
cin>>num1;
cout<<”Masukkan nilai ke 2 :”;
cin>>num2;
break;
case 5 :
cout<<”*********************”<<endl;
cout<<”***** PANGKAT 2 *****”<<endl;
cout<<”*********************”<<endl;
pangkat();
break;
case 6 :
cout<<”*********************”<<endl;
cout<<”***** PANGKAT n *****”<<endl;
cout<<”*********************”<<endl;
pangkat_n();
break;
case 7:
cout<<”*******************”<<endl;
cout<<”*** PERSEN (%) ***”<<endl;
cout<<”*******************”<<endl;
cout<<”Masukkan nilai :”;
cin>>num1;
break;
case 8:
cout<<”*******************”<<endl;
cout<<”*** AKAR ***”<<endl;
cout<<”*******************”<<endl;
akar2();
break;
case 9:
cout<<”*******************”<<endl;
cout<<”*** SIN ***”<<endl;
cout<<”*******************”<<endl;
xin();
break;
case 10:
cout<<”*******************”<<endl;
cout<<”*** COS ***”<<endl;
cout<<”*******************”<<endl;
xos();
break;
case 11:
cout<<”*******************”<<endl;
cout<<”*** TAN ***”<<endl;
cout<<”*******************”<<endl;
xan();
break;
}
}
void hitung::proses()
{
switch(pilih)
{
case 1:
a=num1*num2;
cin.ignore();
break;
case 2:
b=num1/num2;
cin.ignore();
break;
case 3:
c=num1+num2;
cin.ignore();
break;
case 4:
d=num1-num2;
cin.ignore();
break;
case 7:
e=num1/100;
cin.ignore();
break;
}
}
void hitung::tampilan()
{
switch(pilih)
{
case 1:
cout<<endl;
cout<<”Hasil Perkalian=”<<endl<<num1<<”*”<<num2<<”=”<<a<<endl;
cout<<endl;
break;
case 2:
cout<<endl;
cout<<”Hasil Pembagian=”<<endl<<num1<<”/”<<num2<<”=”<<b<<endl;
cout<<endl;
break;
case 3:
cout<<endl;
cout<<”Hasil Penjumlahan=”<<endl<<num1<<”+”<<num2<<”=”<<c<<endl;
cout<<endl;
break;
case 4:
cout<<endl;
cout<<”Hasil Pengurangan=”<<endl<<num1<<”-”<<num2<<”=”<<d<<endl;
cout<<endl;
break;
case 7:
cout<<endl;
cout<<”Nilai Persen=”<<endl<<num1<<”/”<<100<<”=”<<e<<” % “<<endl;
cout<<endl;
break;
}
}
void hitung::pangkat(){
cout<<”masukkan nilai : “;
cin>>num1;
int hasil=1;
for(int i=1;i<=2;i++)
hasil*=num1;
cout<<”hasil pangkat= “<<hasil<<endl;
}
void hitung::pangkat_n(){
cout<<”contoh a^n”;
cout<<endl;
cout<<”masukkan nilai a : “;
cin>>num1;
cout<<”masukan pangkat : “;
cin>>a;
int hasil=1;
for(int i=1;i<=a;i++)
hasil*=num1;
cout<<”hasil pangkat= “<<hasil<<endl;
}
void hitung::akar2(){
cout<<”Masukkan nilai : “;
cin>>num1;
hasil=sqrt(num1);
cout<<endl;
cout<<”Nilai dari akar =”<<hasil<<endl;
}
void hitung :: xin(){
cout<<endl;
cout<<”Masukkan nilai : “;
cin>>num1;
hasil=sin(num1);
cout<<endl;
cout<<”Nilai dari sin “<<num1 <<” =”<<hasil<<endl;
}
void hitung :: xos(){
cout<<endl;
cout<<”Masukkan nilai : “;
cin>>num1;
hasil=cos(num1);
cout<<endl;
cout<<”Nilai dari cos “<<num1<<”=”<<hasil<<endl;
}
void hitung :: xan(){
cout<<endl;
cout<<”Masukkan nilai : “;
cin>>num1;
hasil=tan(num1);
cout<<endl;
cout<<”Nilai dari tan “<<num1<<”=”<<hasil<<endl;
}
int main(int argc, char *argv[])
{
class hitung mat;
char ulang;
x:
mat.judul();
mat.masukan();
mat.proses();
mat.tampilan();
cout<<”Anda Ingin Mengulang?(Y/N)”;
cin>>ulang;
cout<<endl;
system(“cls”);
if(ulang==’y'||ulang==’Y')goto x;
else
cout<<”Program Berakhir, Tekan ENTER untuk keluar”<<endl;
system(“PAUSE”);
return EXIT_SUCCESS;
}
#include <iostream>
#include <string.h>
#include <conio.h>
#include <math.h>
#include <windows.h>
using namespace std;
class hitung
{
private:
float num1,num2,a,b,c,d,e;
float hasil;
int pilih;
public:
void judul();
void masukan();
void proses();
void tampilan();
void pangkat();
void pangkat_n();
void akar2();
void xin();
void xos();
void xan();
};
void hitung::judul()
{
HANDLE hConsole;
hConsole = GetStdHandle (STD_OUTPUT_HANDLE);
SetConsoleTextAttribute
(hConsole, FOREGROUND_GREEN | FOREGROUND_INTENSITY);
cout<<” *=*=*=*=*=*=*=*=*=*=*=*=*=*= BY *=*=*=*=*=*=*=*=*=*=*=*=*=*=”<<endl;
cout<<” *=*=*=*=*=*=*=*=*=*=*=*=*= M. Muhafid *=*=*=*=*=*=*=*=**=*=*=*=*=”<<endl;
cout<<” *=*=*=*=*=*=*=*=*=*=*=*= 10018053 =*=*=*=*=*=*=*=*=*=*=*=*=\n”<<endl;
cout<<” *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=”<<endl;
cout<<” **=*=*=*=*=*=*=*=*= WELCOME *=*=*=*=*=*=*=*=*=*=”<<endl;
cout<<” **=*=*=*=*=*=*=*=*= KALKULATOR DIGITAL *=*=*=*=*=*=*=*=*=*=”<<endl;
cout<<” *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=\n”<<endl;
cout<<endl;
}
void hitung::masukan()
{
HANDLE hConsole;
hConsole = GetStdHandle (STD_OUTPUT_HANDLE);
SetConsoleTextAttribute
(hConsole, FOREGROUND_RED | FOREGROUND_INTENSITY);
cout<<” ================================================================\n”;
cout<<” ======= SILAHKAN MEMILIH OPERATOR YANG ANDA INGINKAN =======\n”;
cout<<” ================================================================\n”;
cout<<” ====================== 1. PERKALIAN ====================”;
cout<<endl;
cout<<” ====================== 2. PEMBAGIAN ====================”;
cout<<endl;
cout<<” ====================== 3. PENJUMLAHAN ====================”;
cout<<endl;
cout<<” ====================== 4. PENGURANGAN ====================”;
cout<<endl;
cout<<” ====================== 5. PANGKAT 2 ====================”;
cout<<endl;
cout<<” ====================== 6. PANGKAT n ====================”;
cout<<endl;
cout<<” ====================== 7. PERSEN (%) ====================”;
cout<<endl;
cout<<” ====================== 8. AKAR ====================”;
cout<<endl;
cout<<” ====================== 9. SIN ====================”;
cout<<endl;
cout<<” ====================== 10. COS ====================”;
cout<<endl;
cout<<” ====================== 11. TAN ====================\n”;
cout<<” ================================================================\n”;
SetConsoleTextAttribute
(hConsole, FOREGROUND_GREEN | FOREGROUND_INTENSITY);
cout<<” PILIHAN ANDA ADALAH : “ ;
cin>>pilih;
cout<<endl;
system(“cls”);
switch(pilih)
{
case 1:
HANDLE hConsole;
hConsole = GetStdHandle (STD_OUTPUT_HANDLE);
SetConsoleTextAttribute
(hConsole, FOREGROUND_BLUE | FOREGROUND_INTENSITY);
cout<<” *****************”<<endl;
cout<<” *** PERKALIAN ***”<<endl;
cout<<” *****************\n”<<endl;
cout<<”Masukkan nilai ke 1 :”;
cin>>num1;
cout<<”Masukkan nilai ke 2 :”;
cin>>num2;
break;
case 2:
cout<<”*****************”<<endl;
cout<<”*** PEMBAGIAN ***”<<endl;
cout<<”*****************”<<endl;
cout<<”Masukkan nilai ke 1 :”;
cin>>num1;
cout<<”Masukkan nilai ke 2 :”;
cin>>num2;
break;
case 3:
cout<<”*******************”<<endl;
cout<<”*** PENJUMLAHAN ***”<<endl;
cout<<”*******************”<<endl;
cout<<”Masukkan nilai ke 1 :”;
cin>>num1;
cout<<”Masukkan nilai ke 2 :”;
cin>>num2;
break;
case 4:
cout<<”*******************”<<endl;
cout<<”*** PENGURANGAN ***”<<endl;
cout<<”*******************”<<endl;
cout<<”Masukkan nilai ke 1 :”;
cin>>num1;
cout<<”Masukkan nilai ke 2 :”;
cin>>num2;
break;
case 5 :
cout<<”*********************”<<endl;
cout<<”***** PANGKAT 2 *****”<<endl;
cout<<”*********************”<<endl;
pangkat();
break;
case 6 :
cout<<”*********************”<<endl;
cout<<”***** PANGKAT n *****”<<endl;
cout<<”*********************”<<endl;
pangkat_n();
break;
case 7:
cout<<”*******************”<<endl;
cout<<”*** PERSEN (%) ***”<<endl;
cout<<”*******************”<<endl;
cout<<”Masukkan nilai :”;
cin>>num1;
break;
case 8:
cout<<”*******************”<<endl;
cout<<”*** AKAR ***”<<endl;
cout<<”*******************”<<endl;
akar2();
break;
case 9:
cout<<”*******************”<<endl;
cout<<”*** SIN ***”<<endl;
cout<<”*******************”<<endl;
xin();
break;
case 10:
cout<<”*******************”<<endl;
cout<<”*** COS ***”<<endl;
cout<<”*******************”<<endl;
xos();
break;
case 11:
cout<<”*******************”<<endl;
cout<<”*** TAN ***”<<endl;
cout<<”*******************”<<endl;
xan();
break;
}
}
void hitung::proses()
{
switch(pilih)
{
case 1:
a=num1*num2;
cin.ignore();
break;
case 2:
b=num1/num2;
cin.ignore();
break;
case 3:
c=num1+num2;
cin.ignore();
break;
case 4:
d=num1-num2;
cin.ignore();
break;
case 7:
e=num1/100;
cin.ignore();
break;
}
}
void hitung::tampilan()
{
switch(pilih)
{
case 1:
cout<<endl;
cout<<”Hasil Perkalian=”<<endl<<num1<<”*”<<num2<<”=”<<a<<endl;
cout<<endl;
break;
case 2:
cout<<endl;
cout<<”Hasil Pembagian=”<<endl<<num1<<”/”<<num2<<”=”<<b<<endl;
cout<<endl;
break;
case 3:
cout<<endl;
cout<<”Hasil Penjumlahan=”<<endl<<num1<<”+”<<num2<<”=”<<c<<endl;
cout<<endl;
break;
case 4:
cout<<endl;
cout<<”Hasil Pengurangan=”<<endl<<num1<<”-”<<num2<<”=”<<d<<endl;
cout<<endl;
break;
case 7:
cout<<endl;
cout<<”Nilai Persen=”<<endl<<num1<<”/”<<100<<”=”<<e<<” % “<<endl;
cout<<endl;
break;
}
}
void hitung::pangkat(){
cout<<”masukkan nilai : “;
cin>>num1;
int hasil=1;
for(int i=1;i<=2;i++)
hasil*=num1;
cout<<”hasil pangkat= “<<hasil<<endl;
}
void hitung::pangkat_n(){
cout<<”contoh a^n”;
cout<<endl;
cout<<”masukkan nilai a : “;
cin>>num1;
cout<<”masukan pangkat : “;
cin>>a;
int hasil=1;
for(int i=1;i<=a;i++)
hasil*=num1;
cout<<”hasil pangkat= “<<hasil<<endl;
}
void hitung::akar2(){
cout<<”Masukkan nilai : “;
cin>>num1;
hasil=sqrt(num1);
cout<<endl;
cout<<”Nilai dari akar =”<<hasil<<endl;
}
void hitung :: xin(){
cout<<endl;
cout<<”Masukkan nilai : “;
cin>>num1;
hasil=sin(num1);
cout<<endl;
cout<<”Nilai dari sin “<<num1 <<” =”<<hasil<<endl;
}
void hitung :: xos(){
cout<<endl;
cout<<”Masukkan nilai : “;
cin>>num1;
hasil=cos(num1);
cout<<endl;
cout<<”Nilai dari cos “<<num1<<”=”<<hasil<<endl;
}
void hitung :: xan(){
cout<<endl;
cout<<”Masukkan nilai : “;
cin>>num1;
hasil=tan(num1);
cout<<endl;
cout<<”Nilai dari tan “<<num1<<”=”<<hasil<<endl;
}
int main(int argc, char *argv[])
{
class hitung mat;
char ulang;
x:
mat.judul();
mat.masukan();
mat.proses();
mat.tampilan();
cout<<”Anda Ingin Mengulang?(Y/N)”;
cin>>ulang;
cout<<endl;
system(“cls”);
if(ulang==’y'||ulang==’Y')goto x;
else
cout<<”Program Berakhir, Tekan ENTER untuk keluar”<<endl;
system(“PAUSE”);
return EXIT_SUCCESS;
}
program menghitung deret
#include <iostream.h>
#include <conio.h>
#include <math.h>
class Deret{
public :
int DeretAritmatika(int n);
float DeretGeometri(float a,float r,int n);
private :
};
// fungsi DeretAritmatika
int Deret::DeretAritmatika(int n){
int jumlah=0;
for (int i=1;i<=n;i++){
jumlah+=i;
}
cout << " Hasil Deret Aritmatika : " <<jumlah;
return 0;
}
// fungsi DeretGeometri
float Deret::DeretGeometri(float a,float r,int n){
float jumlah=a;
for (float i=1;i<=n;i++){
jumlah+=a*(r,i);
}
cout << " Hasil Deret Geometri : " <<jumlah;
return 0;
}
void main(){
Deret X;
int pil;
ulang:
cout << " Kumpulan Hitung Deret :\n";
cout << " 1. Deret Aritmatika \n";
cout << " 2. Deret Geometri \n";
cout << " Pilihan Anda [1,2] : ";
cin >>pil;
switch(pil){
case 1:
int n;
cout << " \n Menghitung Deret Aritmatika \n";
cout << " Masukkan Bilangan Bulat(n) : ";
cin >> n;
X.DeretAritmatika(n);
break;
case 2:
int a,r;
cout << " \n Menghitung Deret Geometri\n";
cout << " Masukkan Bilangan real(a) : ";
cin >> a;
cout << " Masukkan Bilangan real(r) : ";
cin >> r;
cout << " Masukkan Bilangan Bulat(n) : ";
cin >> n;
X.DeretGeometri(a,r,n);
break;
default:
cout << " Masukkan Salah, Silahkkan ulangi lagi..? ";
getch();
clrscr();
goto ulang;
break;
}
getch();
}
#include <conio.h>
#include <math.h>
class Deret{
public :
int DeretAritmatika(int n);
float DeretGeometri(float a,float r,int n);
private :
};
// fungsi DeretAritmatika
int Deret::DeretAritmatika(int n){
int jumlah=0;
for (int i=1;i<=n;i++){
jumlah+=i;
}
cout << " Hasil Deret Aritmatika : " <<jumlah;
return 0;
}
// fungsi DeretGeometri
float Deret::DeretGeometri(float a,float r,int n){
float jumlah=a;
for (float i=1;i<=n;i++){
jumlah+=a*(r,i);
}
cout << " Hasil Deret Geometri : " <<jumlah;
return 0;
}
void main(){
Deret X;
int pil;
ulang:
cout << " Kumpulan Hitung Deret :\n";
cout << " 1. Deret Aritmatika \n";
cout << " 2. Deret Geometri \n";
cout << " Pilihan Anda [1,2] : ";
cin >>pil;
switch(pil){
case 1:
int n;
cout << " \n Menghitung Deret Aritmatika \n";
cout << " Masukkan Bilangan Bulat(n) : ";
cin >> n;
X.DeretAritmatika(n);
break;
case 2:
int a,r;
cout << " \n Menghitung Deret Geometri\n";
cout << " Masukkan Bilangan real(a) : ";
cin >> a;
cout << " Masukkan Bilangan real(r) : ";
cin >> r;
cout << " Masukkan Bilangan Bulat(n) : ";
cin >> n;
X.DeretGeometri(a,r,n);
break;
default:
cout << " Masukkan Salah, Silahkkan ulangi lagi..? ";
getch();
clrscr();
goto ulang;
break;
}
getch();
}
Langganan:
Postingan (Atom)