This is default featured slide 1 title
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.
This is default featured slide 2 title
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.
This is default featured slide 3 title
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.
This is default featured slide 4 title
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.
This is default featured slide 5 title
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.
Thursday, May 3, 2012
Perulangan (LOOPING) Bentuk Segitiga Piramida Angka pada Linux with C
Wednesday, May 2, 2012
Perulangan (Looping) Bentuk Segitiga Terbalik pada Linux with C
Berikut ini merupakan contoh dari Perulangan (Looping) Membuat Bentuk Segitiga Terbalik dengan menggunakan Linux with C..
Penulis menggunakan VMWare sebagai media untuk menjalankan Linuxnya..
Tampilan Kodingnya:
Hasilnya:
Bentuk Yang lainnya:
Hasilnya:
Perulangan (Looping) Bentuk Segitiga pada Linux with C
Penulis menggunakan VMWare sebagai media untuk menjalankan Linuxnya..
Tampilan Kodingnya:
Hasil tampilannya ketika Program Dijalankan..
Ketika Kita input angka 5..
Berikut ini adalah Versi Lainnya:
Berikut ini adalah Hasilnya:
Program Mencari Nilai Tangen (TAN) dengan math.h di C++
#include <iostream.h>
#include <math.h>
#include<conio.h>
#define PI 3.14159265
void main ()
{
double param, result;
param = 45.0;
result = tan (param*PI/180);
cout<<”tan 45 = “<<result<<endl;
getch();
}
Program Mencari Nilai Cosinus (COS) dengan math.h di C++
#include<math.h>
#include <conio.h>
void main(){
clrscr();
int a;
const float phi =3.14159265;
float hasil;
cout<<"masukan a: "; cin>>a;
hasil = cos (a*phi/180);
cout<<"hasilnya= "<<hasil<<endl;
getch();
}
Program Mencari Nilai Sinus (SIN) dengan math.h di C++
#include<iostream.h>
#include<math.h>
#include <conio.h>
void main(){
clrscr();
int a;
const float phi =3.14159265;
float hasil;
cout<<"masukan a: "; cin>>a;
hasil = sin (a*phi/180);
cout<<"hasilnya = "<<hasil<<endl;
getch();
}
Program Mencari Nilai Absolute (ABS) dengan math.h di C++
#include <iostream.h>
#include <math.h>
#include <conio.h>
void main ()
{
int a;
clrscr();
cout<<"Masukan Nilai Mutlak: ";
cin>> a;
cout<<"Nilai Mutlaknya adalah: "<<abs (a);
getch();
}
Tuesday, May 1, 2012
Program Menggabungkan 2 Kata (STRCAT) di C++
#include<iostream.h>
#include<conio.h>
#include<string.h>
void main()
{
char kata1[100];
char kata2[100];
clrscr();
cout<<"Masukan kata1:"; cin>>kata1;
cout<<"masukan kata2:"; cin>>kata2;
strcat(kata1,kata2);
cout<<"penggabungan kedua kata adalah "<<kata1;
getch();
}
Program Copy Kata (STRCPY) di C++
#include<iostream.h>
#include<conio.h>
#include<string.h>
void main()
{
char kata1[100];
char kata2[100];
clrscr();
cout<<"Masukan kata:"; cin>>kata1;
strcpy(kata2,kata1);
cout<<"kata1 adalah:"<<kata1<<endl;
cout<<"kata2 adalah:"<<kata2<<endl;
getch();
}
Program Mengubah Tulisan Menjadi Huruf Besar/Kecil (STRUPR/STRLWR) di C++
#include<iostream.h>
#include<conio.h>
#include<string.h>
void main()
{
char string1[40];
clrscr();
cout<<"masukan kata: "; cin>> string1;
strupr(string1);
cout<<"upper="<<string1;
cout<<endl;
strlwr(string1);
cout<<"lower="<<string1;
getch();
}
Program Mencari Panjang Kata (STRLEN) di C++
#include<iostream.h>
#include<conio.h>
#include<string.h>
void main()
{
int panjangteks;
char kata1[100];
clrscr();
cout<<"Masukan kata yang diinginkan: "; cin>>kata1;
panjangteks=strlen(kata1);
cout<<"panjang kata adalah= "<<panjangteks;
getch();
}
Program Pembalik Kata (STRREV) di C++
#include<iostream.h>
#include<conio.h>
#include<string.h>
void main()
{
char string1[40];
clrscr();
cout<<"masukan kata: "; cin>>string1;
strrev(string1);
cout<<"hasil pembalikan kata:"<<string1;
getch();
}


















