#include<stdio.h> int main(void) { printf("朱妍\n"); printf("朱\n"); printf("妍\n"); printf("朱妍\n"); return 0; }
#include<stdio.h> int main(void) { printf("朱妍\n"); printf("浙江树人大学\n"); return 0; }
#include<stdio.h> int main(void) { int ageYear; int ageDays; int totalDays; ageYear=18; ageDays=365; totalDays=ageYear*ageDays; printf("totalDays=%d",totalDays); return 0; }
For he's a jolly good fellow! For he's a jolly good fellow! For he's a jolly good fellow! Which nobody can deny! 除了main()函数之外,该程序还要调用两个自定义函数:一个名为jolly(),用于打印前三条消息,调用一次打印一条;另外一个函数名为deny(),打印最后一条消息。函数
#include<stdio.h> void jolly(); void deny(); int main(void) { jolly(); jolly(); jolly(); deny(); return 0; } void jolly() { printf("For he's a jolly good fellow!\n"); } void deny() { printf("Which nobody can deny!\n"); }
Brazil,Russia,India,China India,China Brazil,Russia 除了main()之外,该程序还要调用两个自定义函数:一个名为br(),调用一次打印一次“Brazil,Russia”;另外一个名为ic(),调用一次打印一次“India,China"。其余内容在main()函数中完成。code
#include<stdio.h> void br(); void ic(); int main() { br(); printf(","); ic(); printf("\n"); ic(); printf(","); printf("\n"); br(); return 0; } void br() { printf("Brazil,Russia"); } void ic() { printf("Lndia,China"); }
#include<stdio.h> int main(void) { int toes=10; int dbtoes,pftoes; dbtoes=toes*2; pftoes=toes*toes; printf("%d\n",toes); printf("%d\n",dbtoes); return 0; }
Smile!Smile! Smile! 该程序要定义一个函数,该函数被调用一次打印一次“Smile!",根据程序的须要使用该函数。three
#include<stdio.h> void wx(); void hh(); int main(void) { wx(); wx(); wx(); hh(); wx(); wx(); hh(); wx(); hh(); return 0; } void wx() { printf("Smile!"); } void hh() { printf("\n"); }
void one_three(); void two(); int main(void) { printf("starting now\n"); one_three(); printf("done!\n"); return 0; } void one_three() { printf("one\n"); two(); printf("three\n"); } void two() { printf("two\n"); }