• This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #149
    admin
    Keymaster
      
      
      #include<stdio.h>
      #include<cs50.h>
      #include<string.h>
      #include<ctype.h>
      int main(void)
      {
          string name = get_string("Enter: ");
          printf("Entered text by user: %s\n", name);
          int n = strlen(name);
          printf("lenght of entered text: %i\n", n);
          int key = get_int("enter key: ");
          for (int i = 0; i < n; i++)
          {
            
              {
              isalpha name = name + key;
              }
          }
          printf("cipher text: %s\n", name);
      }

       

      Intend to convert to cipher text only when alphabetical characters. Facing problem coding if name is alphabetical, only then name = name + key.


      Reply


      https://edstem.org/us/courses/176/discussion/1002204[learn_press_profile]

    Viewing 1 post (of 1 total)
    • You must be logged in to reply to this topic.
    Scroll to Top