SHARE
TWEET

KUROMOJ87

a guest Jan 19th, 2020 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. #include <ctype.h>
  3. #include <string.h>
  4. #include <stdlib.h>
  5.  
  6.  
  7. void cezar(char *niza, int pomestuvanje) {
  8.     //int bukva=*niza;
  9.     if (*niza)
  10.     {
  11.         if(isupper(*niza)) {
  12.             printf("%c",((*niza-'A')+pomestuvanje)%26+65);
  13.         } else if(islower(*niza)) {
  14.             printf("%c",((*niza-'a')+pomestuvanje)%26+97);
  15.         } else
  16.             printf("%c",*niza);
  17.         return cezar(niza+1,pomestuvanje);
  18.     }
  19. }
  20.  
  21. int main() {
  22.     int n,x;
  23.     scanf("%d%d",&n,&x);
  24.     char niza[80][80];
  25.     int i;
  26.     for(i=0; i<=n; i++) {
  27.         fgets(niza[i], sizeof(niza), stdin);
  28.     }
  29.  
  30.     for(i=0; i<=n; i++) {
  31.         cezar(niza[i],x);
  32.     }
  33. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top