Quote:
Originally posted by Unregistered
void solid sq(int);
int main()
{
int num;
cout<<"enter how many sides"<<endl;
cin>>num;
solidsq(num) // since the cout<< part is in the function there is no
//need for it here
return 0;
}
void soildsq(int x)//not too sure about making it void
//but it doesn't look like you are returning anything
{
int counter=1;// having a 0 would make it have 5 *
int count =1;// same as above
for( ;counter<=x;counter++)//the first part has already
//been intialized
for( ;count<=x;count++)
{
cout<<"*";
}
cout<<endl;
}
}
not sure if it will work because i don't have a compiler