Konverter Huruf
Source Code :
#include <iostream>
#include <string.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)
{
string
a;
cout<<"\t\tProgram
Koverter Huruf\n\n";
cout<<"masukkan
kalimat : ";
getline(cin,a);
int b =
a.length();
cout<<"\ndalam
bentuk kapital : ";
for(int
c=0;c<=b;c++)
{
a[c]=toupper(a[c]);
cout<<a[c];
}
cout<<endl;
cout<<"\ndalam
bentuk huruf kecil : ";
for(int
d=0;d<=b;d++)
{
a[d]=tolower(a[d]);
cout<<a[d];
}
cout<<endl;
return
0;
}
Hasilnya :
0 komentar:
Posting Komentar