I'm having trouble running my code because of a permission denial...Could someone please help me? THanks :)
Here's my code:
#include <stdio.h>
#include <ctype.h>
#include <cs50.h>
#include <string.h>
#include <stdlib.h>
int main(int argc, string argv[])
{
if (argc == 2 && isdigit(*argv[2]))
{
printf("Usage: ./caesar key\n");
return 1;
}
int cle = atoi(argv[1]);
string m = get_string("Please enter plaintext here: ");
printf("Here is the ciphertext translation: ");
for (int i = 0, p = strlen(m) ; i < p; i++)
{
if (m[i] <= 'Z' && m[1] >= 'A')
{
printf("%c", (((m[1] - 'A') + cle) % 26) + 'A');
}
else if (m[1] <= 'z' && m[1] >= 'a')
{
printf("%c", (((m[1] - 'a') + cle) % 26) + 'a');
}
else
{
printf("%c", m[1]);
}
printf("\n");
return 0;
}
{
printf ("Usage: ./caesar k\n");
return 1;
}
}