1. Silas Baronda
  2. cse_459.21

Source

cse_459.21 / lab2 / main.c

#include <stdio.h>
#include <string.h>
#include "encrypt.h"

/* encryption */
int main () 
{
	char encryption;
	char *input, output[36]; /* More than enough for 20 characters */

	printf("Please choose an encryption level: ");
  encryption = getchar();
  while(getchar() != '\n');

	printf("Please provide an input sentence: ");
  fgets(&input, 36, stdin);

	if (encryption == 's' ) {
		/* Call simple encryption function, please fill in */
    sEncryption(&input, &output);
	} else if (encryption == 'm' ) {
		/* Call medium encryption function, please fill in */
    mEncryption(&input, &output);
	} else {
    uEncryption(&input, &output);
		/* Call ultra encryption function, please fill in */
	}

	printf("Your encrypted sentence is: %s\n", output);

	return 0;
}