IHYPRESS PROGRAMMING
Tutorials and C programs with code and output for beginners
c programming
HOME | ASP | C | CSS | GNUPLOT | HTML | JAVASCRIPT | PERL | PHP | PYTHON | RUBY | SVG
CSimple Functions : One Argument / No Result
<05.02>
/* A void function with one argument */
#include <stdio.h> /* a void function returns nothing */ void stars2 (int n) { int i; /* a loop displaying a star at each iteration */ for (i=1; i<=n; ++i) { printf ("*"); } /* change line after each series */ printf ("\n"); } int main (void) { int a; a=10; /* the argument may be a constant, a variable or an expression */ stars2 (20); stars2 (a); stars2 (a+2); return (0); }
Hergestellt in Deutschland / Made in Germany
******************** ********** ************
COPYRIGHT © 2015-2024 IHY PRESS Frankfurt am Main 60329 Deutschland