SHARE
TWEET

Untitled

a guest Dec 14th, 2019 107 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <cs50.h>
  2. #include <stdio.h>
  3. #include <string.h>
  4. #include <ctype.h>
  5.  
  6.  
  7. int main(int argc, string argv[1])
  8. {
  9.     if (argc == 2)
  10.     {
  11.      
  12.         for (int  j = 0, n = strlen(argv[1]); j < n ; j++)
  13.         {
  14.          
  15.            
  16.             if (isdigit(argv[1][j]))
  17.             {
  18.        
  19.                 printf("%c", (argv[1][j]));
  20.                
  21.             }
  22.                
  23.         }
  24.         printf ("\n");
  25.         printf("Success\n");
  26.     }  
  27.  
  28.    
  29.     else
  30.     {
  31.         printf("Usage: ./caesar key\n");
  32.        
  33.         return 1;
  34.      
  35.     }
  36.        
  37.    
  38.      
  39. }
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top