View Single Post
Old 11-25-2004, 02:48 AM   #3 (permalink)
DemonEdge
 
Newb Techie

Join Date: Nov 2004

Posts: 38

DemonEdge

Default

k...i tried writing it like following:

#include <iostream.h>
void main()
{
int num;
char #include <iostream.h>
void main()
{
int num;
char cha;
cout<<"Please enter a number: ";
cin>>num;
cout<<"Please enter a character: ";
cin>>cha;
for(int i=0;i<num;i++)
{
cout<<cha;
cha = cha + "" && + cha;
}
cout<<endl;
}

now the result is the following:

Please enter a number: 7
Please enter a character: *
*






Press any key to continue
DemonEdge is offline