Advertisement
Guest User

main.c

a guest
May 27th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.57 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4.  
  5. int main(){
  6.     char str[100000];
  7.     scanf("%s",str);
  8.     int i;
  9.     int meret;
  10.     meret=strlen(str);
  11.     int code;
  12.     code = (int)str[0];
  13.     if( code >= 97 && code <= 122 ){
  14.         int code2;
  15.         code2=code-32;
  16.         str[0]=(char)code2;
  17.        }
  18.     for(i=0;i<meret;i++){
  19.         if( str[i] ==  '.' || str[i] ==  '!' || str[i] ==  '?'){
  20.             toupper(str[i+2]);
  21.             }
  22.         else str[i]=str[i];
  23.     }
  24.     for(i=0; i<meret; i++)
  25.         printf("%c", str[i]);
  26.     return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement