Data Enc&Dec
Data Enc&Dec
h>
#include <string.h>
#include <ctype.h>
int main() {
char text[100], result[100];
int choice;
printf("Choose an option:\n");
printf("1. Encrypt the text\n");
printf("2. Decrypt the text\n");
printf("Enter your choice (1 or 2): ");
scanf("%d", &choice);
switch (choice) {
case 1:
encrypt(text, result);
printf("Encrypted text: %s\n", result);
break;
case 2:
decrypt(text, result);
printf("Decrypted text: %s\n", result);
break;
default:
printf("Invalid choice. Please select 1 or 2.\n");
}
return 0;
}