Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <cs50.h>
- #include <string.h>
- #include <ctype.h>
- int main(int argc, string argv[1])
- {
- if (argc != 2)
- {
- printf("Usage: ./caesar key\n");
- }
- else
- {
- for (int j = 0, n = strlen(argv[1]); j < n; j++)
- {
- if(isdigit(argv[1][j]))
- {
- printf("%c\n", argv[1][j]);
- }
- else
- {
- printf("Usage: ./caesarkey\n");
- return 1;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment