Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <conio.h>
- #include <string.h>
- #include <stdlib.h>
- void main()
- {
- char input[255], input2[255], choice;
- do {
- system("CLS");
- printf("Please enter a string: \t\t");
- fgets(input, 254, stdin);
- printf("\nPlease enter another string: \t");
- fgets(input2, 254, stdin);
- if (strcmp(input, input2) == 0)
- printf("The strings: \n%s\n%s\n are identical.", input, input2);
- else
- printf("The strings: \n%s\n%s\n are not identical.", input, input2);
- printf("\nDo you want to continue? [Y]es or Enter or just press any other key to exit.\n");
- choice = _getche();
- } while (choice == 'Y' || choice == 'y' || choice== '\r');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement