Tasks and codes
/**copyright (c) 2016,CSDN College *all rights reserved.* file name: lzz.c* Creator: Linzeze * Completion Date: May 8, 2016 * version number: v1.0* Problem Description: This set of exercises is intended to output an asterisk graph by invoking a function, to understand and comprehend the working process of the function, and to implement a specific function for subsequent programming of the custom function. (1) Complete the following procedure, so that the program output asterisks below the asterisk chart: (2) According to the main function of the call to Printchs function, as well as the functional requirements of printchs, write Printchs function, so that the following program can output an asterisk graph: (3) in the above program, Change only one place, output the following graphics * Program input: * Program output: */#include <stdio.h>void printstars (int m)//define the function {int j) that can output a row of M asterisks ; for (j=1; j<=m; ++j) printf ("*");} int main () { int n=6;//n represents the number of rows to output int i; for (I=1; i<=n; ++i) { //Please write the statement below that calls the Printstars function, so that the program output is printstars (i) on the right); printf ("\ n"); } return 0;}
Run results
Improved item 1 (1)--function Edition star chart