I was given a task by my professor to create a pattern in c++ output using a string input by user.
The program should run in the following way:
Enter a string: ***
***
***
***
***
***
***************
***
***
***
***
***
Note : The input string from user can have any number of length or characters
Following are the restrictions for the program:
- No string literals or white spaces in cout statement allowed.
- Use of loops is also forbidden (This is the reason i am stuck ... i successfully created the above program but by using loops)
- No advanced concept of c++ are allowed (at college we just started with basic concepts of how the language works. so please keep this in mind while giving the answer)
I have tried multiple ways to create the above program but due to given restrictions i don't think its possible anymore, so that's why i came here to ask help from the community.
Help will be highly appreciated!
Sorry for my bad English, feel free to edit and correct it if you find any errors or mistakes
Aucun commentaire:
Enregistrer un commentaire