这道题不仅让我蛋疼。还让我有挥刀自宫的冲动。
编写一个程序。发出警声。并打印下列文字
Startled by the sudden sound,Sally shouted,"By the Great Pumpkin,what was that!"
然后我就这样写
#include <stdio.h>
int main()
{
printf("\aStartled by the sudden sound,");
printf("Sally shouted,"By the Great Pumpkin,what was that!"\n");
system("pause");
}
结果老是提示那个引号有问题。这题应该很简单才对啊。我怎么可能做不出来。
[解决办法]
双引号里有双引号,里面的双引号必须\"
[解决办法]
printf("Sally shouted,\"By the Great Pumpkin,what was that!\"\n"); //要用转义