Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main () {
- char c8, c9,c10;
- int i;
- char c = getchar();
- while (c != EOF) {
- while (c != '<' && c != EOF) {
- putchar(c);
- c = getchar();
- }
- if (c == '<'){
- putchar('<');
- c = getchar();
- i = 0;
- while (c != '>' && c != EOF){
- i++;
- if(i <= 10) {
- if (i < 8)
- putchar(c);
- else if (i == 8)
- c8 = c;
- else if (i == 9)
- c9 = c;
- else
- c10 = c;
- }
- c = getchar();
- }
- if (i > 7) {
- if(i == 8)
- printf("%c",c8);
- else if(i == 9)
- printf("%c%c",c8,c9);
- else if(i == 10)
- printf("%c%c%c",c8,c9,c10);
- else
- printf("...");
- }
- putchar('>');
- }
- c = getchar();
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement