14 Kasım 2014 Cuma

Girilen bir kelimenin baş harflerini büyük yazan program

#include <stdio.h>
#include <stdlib.h>
void main()
{
char cmle[50];
    printf("cumleyi giriniz :");gets(cmle);
int i=-1;
cmle[0]=toupper(cmle[0]);
do{  
     i++;
     if(cmle[i]==' ')
     {
     cmle[i+1]=toupper(cmle[i+1]);
     }
  
}
while(cmle[i]!='\0');
printf("%s",cmle);
getch();
}

Hiç yorum yok:

Yorum Gönder