a program with a function printmsg() that has a parameter n. the function prints the messag "hello world" n time
tried making one. not looping. what is problem
Code:#include<iostream.h> #include<conio.h> int getsum(int a); void printmsg(); main() { clrscr(); int n; cout<<"Enter a number : "; cin>>n; do { printmsg(); cout<<getsum(n); } while(getsum(n)<=1); getch(); return(0); } int getsum(int a) { int sum; do { sum=a--; return sum; } while(a<=1); } void printmsg() { cout<<"hello world"; }