Langsung ke konten utama

Postingan

Menampilkan postingan dari Desember, 2015

MACAM-MACAM FUNGSI STRING DAN CONTOH (DEV C++)

1. Strcat (penggabunggan nilai string)     contoh program : #include <iostream> #include <conio.h> #include <string.h> using namespace std; /* run this program using the console pauser or add your own getch, system("pause") or input loop */ int main(int argc, char** argv) { char tanya[50]="siapa namamu?"; cout<<"kalimat tanya : "<<tanya<<endl; strcat(tanya, "nama saya nisa nurist"); cout<<"kalimat tanya dengan jawaban : "<<tanya<<endl;       return 0; } 2. Strchr (mencari nilai karakter dalam string)      contoh program : #include <conio.h> #include <iostream> #include <string.h> #include <ctype.h> #include <stdio.h> /* run this program using the console pauser or add your own getch, system("pause") or input loop */ using namespace std; int main(int argc, char** argv) {     char nama[50]="nisa nur istiqomah"; char ...

MEMODIFIKASI PROGRAM CLASS (DEV C++)

Program Pertama   2. Program Kedua 3. Program Ketiga