Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<string.h>
- #define Maxline 10000
- int main()
- {
- int c,i=0;
- char s[Maxline];
- while((c=getchar())!=EOF)
- {
- s[i]=c;
- i++;
- }
- for(i=0;i<strlen(s);)
- {
- if(s[i]=='/' && s[i+1]=='*')
- {
- while(s[i]!='*' || s[i+1]!='/')
- {
- i++;
- }
- if(s[i]=='*')
- {
- i++;
- }
- }
- else if(s[i]=='/')
- {
- while(s[i]!='\n')
- {
- i++;
- }
- }
- else
- {
- printf("%c",s[i]);
- i++;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement