Back To C User Defined Functions Index
//program to create a function that display hello world for a specified number of times #include
#include
void display(int); void display(int n) { int i; for(i=1;i<=n;i++) { printf("hello world\n"); } } void main() { int n; clrscr(); printf("enter the number of times you want to display message hello world"); scanf("%d",&n); display(n); getch(); }