Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- /*Version 1*/
- void replace_word(char *word);
- void add_new_word_dictionary(void);
- void do_nothing(void);
- void return_basic(void);
- void check_word(void);
- void compute_words(void);
- void compute_characters(void);
- void compute_ch_sp(void);
- void compute_num_dif_words(void);
- void create_istogram(void);
- void save_file(void);
- int get_choice(void);
- char * add_text(void);
- int main()
- {
- int choice = 0;
- char string[40] = {"test"};
- while(choice = get_choice() != 5)
- {
- get_choice();
- printf("your choice is %d",choice);
- if(get_choice()== 0)
- {
- add_text();
- }
- printf("The choice is %d",choice);
- }
- return 0;
- }
- void replace_word(char *word)
- {
- printf("\n replace_word\n");
- return;
- }
- void add_new_word_dictionary(void)
- {
- char word[50] = {"s"};
- printf("\nPlease enter the word\n");
- scanf("\n%s",word);
- printf("Your word is %s",word);
- return;
- }
- void do_nothing(void)
- {
- printf("do_nothing");
- return;
- }
- void return_basic(void)
- {
- printf("\n return basic \n");
- return;
- }
- void check_word(void)
- {
- printf("\ncheck word\n");
- return;
- }
- void compute_words(void)
- {
- printf("\n compute_words \n");
- return;
- }
- void compute_characters(void)
- {
- printf("\n compute characters \n");
- return;
- }
- void compute_ch_sp(void)
- {
- printf("\n compute_ch_sp \n");
- return;
- }
- void compute_num_dif_words(void)
- {
- printf("\n compute_num_same_words \n");
- return;
- }
- void create_istogram(void)
- {
- printf("\n create istogram \n");
- return;
- }
- void save_file(void)
- {
- printf("\n save_file \n");
- return;
- }
- int get_choice(void)
- {
- int choice = 0;
- printf("\n Select a choice from the below \n");
- printf("\n Select 0 to add text \n");
- printf("\n Select 1 to add new words in the dictionary \n");
- printf("\n Select 2 to enter enter correction mode \n");
- printf("\n Select 3 to save the text \n");
- printf("\n Select 4 to see the statistics about your text \n");
- printf("\n Select 5 to exit the program\n");
- scanf("\n%d",&choice);
- return choice;
- }
- char *add_text(void)
- {
- char word[40];
- printf("\n Add the word \n");
- scanf("\n%s",word);
- return word;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement