PROGRAM MEMBACA SEBUAH STRING
MENGUBAH HURUF KAPITAL MENJADI HURUF KECIL
#include <stdio.h>
#include <iostream>
#include <string.h>
using namespace std;
int main()
{
string str;
cin >> str;
for(int i = 0; i < str.length(); i++)
str[i] = tolower(str[i]);
cout << str << '\n';
}
MENGUBAH HURUF KECIL MENJADI KAPITAL
#include <stdio.h>
#include <iostream>
#include <string.h>
using namespace std;
int main()
{
string str;
cin >> str;
for(int i = 0; i < str.length(); i++)
str[i] = toupper(str[i]);
cout << str << '\n';
}
Komentar
Posting Komentar