Skip to content

Instantly share code, notes, and snippets.

@ohmree
Created December 26, 2016 21:08
Show Gist options
  • Save ohmree/b3d1b77f6026f1fa61b28316b660eea8 to your computer and use it in GitHub Desktop.
Save ohmree/b3d1b77f6026f1fa61b28316b660eea8 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <ncurses.h>
int encrypt(int num);
int main()
{
int num = 0;
printf("Enter a positive fcku: ");
scanf("%d", &num);
printf("Enter 4 letters:\n");
encrypt(num);
encrypt(num);
encrypt(num);
encrypt(num);
return 0;
}
int encrypt(int num)
{
char letter = 'a', enc = 0;
letter = getchar();
enc = letter + num;
return(enc);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment