Trying to write a very simple function that boxes in a hello world print out. I have been stuck here for hours now and would appreciate some help as the frustration is killing me.
The print out should look like this.
//////////////////////
/ Hello World /
/ Hello World /
//////////////////////
This is my current code
#include <stdio.h>
void print_hello(int n);
void print_char(int *);
void main()
{
print_hello(10);
print_hello(5);
print_char(1);
}
void print_hello(int n, int *)
{
int i;
int j;
for(i=1 ; i<=n ; i++)
{
printf("Hello World\n");
printf("\n\n");
}
for (int j = 1; j<=i ; j++)
{
printf ("*");
}
}
}
If this will not take you long, please help as I have been here for hours, and would like to move on now.