Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cs50.h>
- #include <string.h>
- #include <stdio.h>
- #include <ctype.h>
- int main ( int argc, string argv[]){
- string theKey = "";
- while (argc != 2){
- printf("You just need to type in a word!");
- if (argv[1]) {
- int i = strlen(argv[1]);
- for (int k = 0; k < i; k++){
- if (isdigit(argv[1][i])){
- printf("No number should be within the word you typed!\n");
- return 1;
- } else {
- theKey = argv[1];
- break;
- }
- }
- }
- }
- printf("The key is %s\n", theKey);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement