程序代碼#include <stdio.h>#include <stdlib.h>/**csdn學院--2016級*目的:讓代碼見證成長(作為一個初學的菜鳥,如*大家有發現錯誤,歡迎指正!)*文件名稱:Myfun105.c*作者:小臣小仁*完成日期:2017年2月16日*/void PRintchs(int a){ int j; for(j=0;j<2*a-1;j++) printf("*");}int main(){ int i; for(i=1;i<=6;i++) { printchs(i); printf("/n"); } return 0;}輸出結果知識點總結函數定義的一般形式為: 返回值類型 函數名{ 形式參數列表 } { 聲明部分 語句 } 心得體會 這個程序打開了我接觸函數這個模塊,希望再接再厲 作為一個大學二的新手,可能錯誤百出,望包涵。
新聞熱點
疑難解答