1.问题
百思不得,为什么无法编译,把注释哪行去掉就可以正常编译。
6 2 C:\Users\lyl\Desktop\c语言\6.c [Error] expected expression before ‘/’ token
14 3 C:\Users\lyl\Desktop\c语言\6.c [Error] ‘s’ undeclared (first use in this function)
14 3 C:\Users\lyl\Desktop\c语言\6.c [Note] each undeclared identifier is reported only once for each function it appears in
#include <stdio.h>
int main()
{
int t=12345670;
[color=DarkRed]//this you write nember[/color]
int s=1;
int x=0;
int g=0;
int f=t;
while(f>10)
{
f /= 10;
s *= 10;
}
while(s>0)
{
x = t/s;
g = g*10 + x;
t %= s ;
s /=10;
printf("%d",x);
printf(" ");
}
return 0;
}
2. 回答
[color = DarkRed ]//this you write nember[/ color];这个注释写的不对呀
(1)
//[color=DarkRed]this you write nember[/color]
(2)
/*[color=DarkRed]//this you write nember[/color]*/
可以用以上方法去注释;
另外:[colo r=DarkRe d]//this you write nember[/colo r]这句应该是哪个论坛的语句吧;
意思就是把“//this you write nember”这句话,变成“DarkRed”(暗红色)