#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]