1. strcat= Merupakan fungsi penambah Kalimat atau
kata.
2. strrev= Merupakan fungsi pembalik kata atau
kalimat
3. strlwr=
berfungsi untuk mengubah dari
huruf kapital kehuruf kecil
#include<iostream>
#include<string.h>
using namespace std;
int main(){
char kata1[100];
char kata2[100];
cout<<"===================================================================="<<endl;
cout<<" \t\t\t\tFungsi
strcat"<<endl;
cout<<"===================================================================="<<endl;
cout<<" Merupakan fungsi penambah
Kalimat atau kata"<<endl;
cout<<" Contoh:"<<endl;
cout<<" Contoh masukkan Kalimat
atau kata : ";
cin.getline(kata1,sizeof(kata1));
cout<<" Masukkan kata yang akan
ditambahkan: ";
cin.getline(kata2,sizeof(kata2));
cout<<" kata setelah ditambahkan
adalah : "<<strcat(kata1,kata2)<<endl;
cout<<endl;
cout<<"
==================================================================="<<endl;
cout<<"from kelompok 4
:"<<endl;
cout<<">\taslam bin
ahmad"<<endl;
cout<<">\tandi abdul dzar
ghifari"<<endl;
cout<<">\tnajmahira
h.r"<<endl;
cout<<">\tshabil"<<endl;
cout<<">\theri
fajri"<<endl;
cout<<endl;
return 0;
}
#include<iostream>
#include<string.h>
using
namespace std;
int main(){
char kata1[100];
cout<<"===================================================================="<<endl;
cout<<"\t\t\t\t Fungsi
strrev"<<endl;
cout<<"===================================================================="<<endl;
cout<<" Merupakan fungsi
pembalik"<<endl;
cout<<" Contoh :"<<endl;
cout<<" Masukkan Kalimat atau kata
Anda: ";
cin.getline(kata1,sizeof(kata1));
cout<<" Hasil:
"<<strrev(kata1)<<endl;
cout<<endl;
cout<<"
==================================================================="<<endl;
cout<<"from kelompok 4
:"<<endl;
cout<<">\tAndi abdul dzar
ghifari"<<endl;
cout<<">\tAslam bin
ahmad"<<endl;
cout<<">\tNajmahira
h.r"<<endl;
cout<<">\tShabil
ma'ruf"<<endl;
cout<<">\tHeri
fajri"<<endl;
cout<<endl;
return 0;
}
#include<iostream>
#include<string.h>
using
namespace std;
int main(){
char kata[100];
cout<<"====================================================================="<<endl;
cout<<"\t\t\t\library string[fungsi
strlwr]
"<<endl;
cout<<"====================================================================="<<endl;
cout<<" fungsi strlwr Merupakan
fungsi dari library string untuk mengubah dari huruf kapital kehuruf
kecil"<<endl;
cout<<" Contoh:"<<endl;
cout<<" Masukkan kata Anda dengan huruf besar : ";
cin.getline(kata,sizeof(kata));
cout<<" hasil:
"<<strlwr(kata)<<endl;
cout<<endl;
cout<<" ==============================================================="<<endl;
cout<<"from kelompok 4
:"<<endl;
cout<<">\taslam bin
ahmad"<<endl;
cout<<">\tandi abdul dzar ghifari"<<endl;
cout<<">\tnajmahira h.r"<<endl;
cout<<">\tshabil"<<endl;
cout<<">\theri fajri"<<endl;
cout<<endl;
return 0;
}
0 komentar
Posting Komentar