suggest in correcting this code

its a program to remove comments
its not working properly

//Program to print a file by removing Comments
#include<stdio.h>
void main()
{
FILE *fp;
char ch;
//clrscr();
fp=fopen("temp.txt","r");
while(1)
{
ch=fgetc(fp);

if(ch==EOF)
break;
else
{
if(ch=='/')
{
ch=fgetc(fp);
if(ch=='/')
{
while(1)
{
ch=fgetc(fp);
if(ch=='\n')
goto label;
}
}
if(ch=='*')
{
while(1)
{
ch=fgetc(fp);
if(ch=='*')
{
ch=fgetc(fp);
if(ch=='/')
{
while(1)
{
ch=fgetc(fp);
goto label;
}
}
else printf("*");
}
}
}
else printf("/");
}
}
label:printf("%c",ch);
}
fclose(fp);
}
[3018 byte] By [rohit83.ken] at [2007-11-20 11:33:05]
# 1 Re: suggest in correcting this code
could you use code tag?
so the code be readable.
**star** at 2007-11-9 1:25:42 >