vc中老是出现少了分括号在常量前面。怎么办……?下面是我的程序(新手一枚)
#include<stdio.h>intmain(void){intfeet,fathoms;fathoms=2;feet=6*fathoms;printf("There...
#include <stdio.h>
int main (void)
{
int feet,fathoms;
fathoms = 2;
feet = 6 * fathoms;
printf ("There are %d feet in %d fathoms!\n",feet,fathoms);
printf ("Yes,I said %d feet!\n,"6*fathoms);
return 0;
}
/* Use 2functions in a cpp. */
#include <stdio.h>
void butler (void); /* Prototype function ISO/ANSI */
int main <void>
{
printf ("I will sommon the butler function.\n");
butler ();
printf ("Bring me some tea and some writeable CD-ROMS.\n");
return 0;
}
void butler (void) /* The beganning of function definition */
printf ("You rang,sir?\n");
}
貌似这个(第二个)问题很多…… 展开
int main (void)
{
int feet,fathoms;
fathoms = 2;
feet = 6 * fathoms;
printf ("There are %d feet in %d fathoms!\n",feet,fathoms);
printf ("Yes,I said %d feet!\n,"6*fathoms);
return 0;
}
/* Use 2functions in a cpp. */
#include <stdio.h>
void butler (void); /* Prototype function ISO/ANSI */
int main <void>
{
printf ("I will sommon the butler function.\n");
butler ();
printf ("Bring me some tea and some writeable CD-ROMS.\n");
return 0;
}
void butler (void) /* The beganning of function definition */
printf ("You rang,sir?\n");
}
貌似这个(第二个)问题很多…… 展开
1个回答
展开全部
第一个printf ("Yes,I said %d feet!\n,"6*fathoms);6前面的双引号应该在逗号前面,改成printf ("Yes,I said %d feet!\n",6*fathoms);
第二个:
#include <stdio.h>
void butler (void); /* Prototype function ISO/ANSI */
int main (void) //这里main函数用()
{
printf ("I will sommon the butler function.\n");
butler ();
printf ("Bring me some tea and some writeable CD-ROMS.\n");
return 0;
}
void butler (void) /* The beganning of function definition */
{ //少了分号
printf ("You rang,sir?\n");
}
第二个:
#include <stdio.h>
void butler (void); /* Prototype function ISO/ANSI */
int main (void) //这里main函数用()
{
printf ("I will sommon the butler function.\n");
butler ();
printf ("Bring me some tea and some writeable CD-ROMS.\n");
return 0;
}
void butler (void) /* The beganning of function definition */
{ //少了分号
printf ("You rang,sir?\n");
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询