C語言初級例題練習

題目:
練習函數調用。
1. 程序分析:
轉自C語言網 www.dotcpp.com。
2.程序源代碼:
#include <stdio.h>
void hello_world(void)
{
printf(“Hello, world!\n”);
}
void three_hellos(void)
{
int counter;
for (counter = 1; counter <= 3; counter++)
hello_world();/*調用此函數*/
}
void main(void)
{
three_hellos();/*調用此函數*/
}
此例題轉自C語言網
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章