Hello everyone,
My name is Stephanie I am new to the forum I have been just reading, this is my first time actually participating in one of the threads. I must say that I have learned a great deal from this site, I have been able to fix minor problem that I have had with my application in my C# homework and I thank you all. I am in need of help again ad I have not come across this subject in any of the forums I have read, I was hoping one of you could tell me what I am doing wrong. I have an assisgnment to create an application that uses for loops that generates a design pattern using Asterisk. Here is my problem I did my for loops using my asterisks and all that good stuff, but I do not know how to do the spaceing so that the output is correct. When I build and debug my output is one straight line of asterisks. I have read the chapter twice and I am just not getting it. I have contacted my Instructor four days ago and he has not responded and the assignment is due on 2/13/08. Can some one please help me. Your help would be greatly appreciated.
The design output is to look like this:
* **** *
** *** **
*** ** ***
**** * ****

Thank you in advance for any help you can offer.

Stephanie:S

Recommended Answers

All 3 Replies

What have you done so far? Can you please post the code you have thus far?

Generally, what you'd do is have a newline after each of those. Either insert a \n at the end of your line, or use Console.WriteLine() instead of Console.Write() if that's what you're doing.

Dear alc6379,

Thank you for your help. I have Console.Write() after each instead of Console.WriteLine()
When I tried \n, I had errors coming out the woodworks. I will try the Console.Write() and see if it gives me what I need. Thanks again.

Stephanie

Here's what I mean:

//this
Console.Write("My line with a newline\n");
//is the same as 
Console.WriteLine("My line with a newline");

What kind of errors are you getting when you append the \n ? Can you post your code?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.