#include /* A void function returns nothing. But it does something useful. */ void stars ( int n ) { int i; /* The integer argument value of "n" is passed to this function from "main" */ /* a loop displaying a star at each iteration */ for (i = 1; i <= n; ++i) printf("*"); /* change line after each series */ printf("\n"); /* there is nothing to return: function has completed all its work. It has type "void" */ } int main( void ) { int n; /* n is a local variable declaraed as int in main */ printf(" Enter the positive integer number of stars that should be printed: "); scanf("%d", &n); /* read valaue of n from the user */ printf("\n"); /* start new line on the standard output */ /* pass number n as an argument to the function "star" that will use it to print "n" stars */ stars( n ); return 0; }