Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #define N 30
- char getchoice();
- void read();
- void loaddict();
- void correct();
- void save();
- void stats();
- void legend();
- int main() {
- char choice;
- legend();
- while(1)
- {
- printf("Please enter your input: ");
- choice = getchoice();
- switch (choice)
- {
- case 'r':
- read();
- break;
- case 'd':
- loaddict();
- break;
- case 'c':
- correct();
- break;
- case 's':
- save();
- break;
- case 'S':
- stats();
- break;
- case 'l':
- legend();
- break;
- case 'e':
- return 0;
- break;
- default:
- printf("\n*Wrong input*\n");
- break;
- }
- }
- }
- char getchoice()
- {
- char choice;
- scanf(" %c", &choice);
- return choice;
- }
- void read()
- {
- printf("\nText read.\n\n");
- return;
- }
- void loaddict()
- {
- printf("\nDictionary inserted.\n\n");
- return;
- }
- void correct()
- {
- printf("\nText corrected.\n\n");
- return;
- }
- void save()
- {
- printf("\nText saved.\n\n");
- return;
- }
- void stats()
- {
- printf("\nStats shown.\n\n");
- return;
- }
- void legend()
- {
- printf("L\tE\tG\tE\tN\tD\t:\n[r:\tInsert text]\n[d:\tLoad dictionary]\n[c:\tCorrect the loaded text]\n[S:\tStatistics]\n[s:\tSave text]\n[l:\tShow legend]\n[e:\tEscape]\n\n");
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment