Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- #define MAX 100
- int main()
- {
- char s[MAX];
- while(fgets(s, MAX, stdin))
- {
- if(s[strlen(s)-4] == '!' && s[strlen(s)-3] == '!' && s[strlen(s)-2] == '!')
- {
- printf("%s", s);
- break;
- }
- if(s[strlen(s) - 2] == '!' || s[strlen(s) - 2] == '.' || s[strlen(s) - 2] == '?')
- printf("%s",s);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement