#include <stdio.h>
void three_hellos(void)
{
int counter; // Variable
for (counter = 1; counter <= 3; counter++)
printf("Hello, world!/n");
}
void main(void)
{
three_hellos();
}
本文展示了一个简单的C语言程序,该程序通过定义一个名为three_hellos的函数来实现打印三次Hello, world!的功能。这个函数使用了一个for循环来控制打印次数。
#include <stdio.h>
void three_hellos(void)
{
int counter; // Variable
for (counter = 1; counter <= 3; counter++)
printf("Hello, world!/n");
}
void main(void)
{
three_hellos();
}

被折叠的 条评论
为什么被折叠?