-5

Using "Nested For" Loop, Write a program that prints the letter M.


Thank you All!

Edited by norbert90: n/a

4
Contributors
6
Replies
7
Views
7 Years
Discussion Span
Last Post by Clinton Portis
1

Using "Nested For" Loop, Write a program that prints the letter M.


Thank you All!

We can't do your homework for you, but we can help. You need to show some effort first.

Try it and post the resultant code. If it doesn't work, fine, we'll help you make it work.

2

FirstPerson... I think the OP asked for a nested for loop :P

Oh ok :

for(int i = 0; i !=1; ++i){
    cout << "M"<<endl;
for(int thisIsStupid = 0; thiIsStupid != 0; );         
}
Votes + Comments
Best. Code. Ever.
0

Sorry Guys,, I meant a letter M of stars "*"
As I know, we should use nested "For loops" and also use id statement inside it.

2

laugh out loud :D

How about this:

for(int i=0; i==0; i=0)
    for(int j=0; j<1; j++)
          cout << "M";

OP: you might want to check this out before you continue to act a fool up in here.

Edited by Clinton Portis: teehee.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.