cud ny1 pls advise me on how to write "SAAR TRAVELS", in c++, using asterik marks (*)...
example :
******
*****
****
***
**
*
Trouble in C++?
I will not do this homework for you (been there - done that), but I will give you a hint :
it is accomplished by using a loop within a loop, one that increments a counter, and one that decrements a counter. The inside loop uses the value of the counter variable in the outside loop to perform its operations.
There - that's a heck of a lot more help than I got when I did this one. Now, you just have to translate it to code, and mess with it 'til it comes out right. Good luck.
Reply:Make sure to include iostream.
cout%26lt;%26lt; "******___******"
___%26lt;%26lt; "**______**__**"
___%26lt;%26lt; "******___*********"
___%26lt;%26lt; "___**___**__**"
___%26lt;%26lt; "*******__**__**" %26lt;%26lt; endl;
There's "SA", you get the picture.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment