Algoritma :
void nama(){
i=integer.
char nama[100];
char c;
char entri[100]//variabel entri maksimum 100
karakter.
while(nama[i]);
{
if(isupper(c)) c=tolower(c);
puthcar (c);
mengubah huruf kecil ke huruf kapital ;
while (entri[a]){
out=entri[a];
if(islower(out)) out=toupper(out);
putvhar (out);
end;
Program :
#include <stdio.h>
#include <ctype.h>
#include <iostream>
#include <conio.h>
using namespace std;
void nama()
{
int i=0;
char nama[100];
char c;
int a=0;
char entri[100];
char out;
cout<<"Masukkan Nama [HURUF KAPITAL] = "; gets(nama);
getche();
cout<<"\nNamamu versi huruf kecil = ";
while (nama[i])
{
c=nama[i];
if (isupper(c)) c=tolower(c);
putchar (c);
i++;
}cout<<endl;
cout<<"Masukkan Frasa Huruf Kecil = "; gets(entri);
getche();
cout<<"\nHasil Inputan Frasa Huruf Besar = ";
while (entri[a])
{
out=entri[a];
if (islower(out)) out=toupper(out);
putchar (out);
a++;
}
}
int main(){
nama();
}
Comments
Post a Comment