Advertisement
lukasd

zadanie 1 zestaw 12

Feb 10th, 2018
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.52 KB | None | 0 0
  1. void kolos1()
  2. {
  3.     char ciag[] = " aaaaaaabbbbb cccccccccc    dddddddd  eeee f\0";
  4.     for (int i = 0; ciag[i] != '\0'; i++)
  5.     {
  6.         printf("%c", ciag[i]);
  7.     }
  8.  
  9.     if ((ciag[0] >= 97 && ciag[0] <= 122))
  10.     {
  11.         ciag[0] = ciag[0] - 32;
  12.     }
  13.     printf("%c", ciag[0]);
  14.     for (int i = 1; ciag[i] != '\0'; i++)
  15.     {
  16.         if ((ciag[i] >= 97 && ciag[i] <= 122) && (ciag[i - 1]!=ciag[i] && ciag[i - 1] != ciag[i]-32))
  17.         {
  18.             ciag[i] = ciag[i] - 32;
  19.         }
  20.         printf("%c", ciag[i]);
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement