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.

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();
}