## Ugaton

guys got some problems with regards to c# programming im new with this one..

my problem is displaying 5 integers or numbers that is having a 3 spaces in between the numbers..

want some of your codes.. thanks a lot guys... Happy new year

## ddanbe 2,720

Hi Ugaton, welcome at Daniweb!
We are all very eager around here to help you out, but what we all like is some effort from your side.
What is the code you got so far? What have you tried for yourself? It is like they say in that song I heard lately : "chewing bubblegum never solved an algebraic equation..."

## Ugaton

Hi Ugaton, welcome at Daniweb!
We are all very eager around here to help you out, but what we all like is some effort from your side.
What is the code you got so far? What have you tried for yourself? It is like they say in that song I heard lately : "chewing bubblegum never solved an algebraic equation..."

got this only bro...

``````string a;

int a1=1;

Console.WriteLine("Enter numbers");

a1 = Int32.Parse(a);

while (a1 <= 99999)
{
{
Console.WriteLine("{0}", a1);
}

}

for now im still working on this one... this will only get 5 numbers.
but i cant split it to have 3 spaces in between.. thanks for the reply.. i guess my codes is far from REALITY.!! ahehehe.. im just trying this one.. wanna help me up again? thanks

## ddanbe 2,720

But if you post code, put it between code tags! See the

``````[/B]mark on top of your posting window.
Well your code is not that bad, it shows very well yu are willing to learn.
Here is my solution. If you have questions : ask!
[CODE=c#]static void Main(string[] args)
{
//string a;
//int a1 = 1;
//Console.WriteLine("Enter numbers");
//a1 = Int32.Parse(a);
//while (a1 <= 99999)
//{
//    {
//        Console.WriteLine("{0}", a1);
//    }
//}

// gave a meaningfull name to my variable instead of naming it "a"
// initialized it to empty by using a method of the string class
string OutputString = string.Empty;

Console.WriteLine("Enter numbers");
// because we have exactly 5 numbers we can use a for loop
for (int i = 0; i < 5; i++)
{
OutputString = OutputString + Console.ReadLine() + "   "; // 3 spaces
}
Console.WriteLine(OutputString.Trim()); // trimmed of the last 3 spaces
Console.ReadKey(); //keep console on screen in debug mode
}``````

## Ugaton

But if you post code, put it between code tags! See the

``````[/B]mark on top of your posting window.
Well your code is not that bad, it shows very well yu are willing to learn.
Here is my solution. If you have questions : ask!
[CODE=c#]static void Main(string[] args)
{
//string a;
//int a1 = 1;
//Console.WriteLine("Enter numbers");
//a1 = Int32.Parse(a);
//while (a1 <= 99999)
//{
//    {
//        Console.WriteLine("{0}", a1);
//    }
//}

// gave a meaningfull name to my variable instead of naming it "a"
// initialized it to empty by using a method of the string class
string OutputString = string.Empty;

Console.WriteLine("Enter numbers");
// because we have exactly 5 numbers we can use a for loop
for (int i = 0; i < 5; i++)
{
OutputString = OutputString + Console.ReadLine() + "   "; // 3 spaces
}
Console.WriteLine(OutputString.Trim()); // trimmed of the last 3 spaces
Console.ReadKey(); //keep console on screen in debug mode
}``````

WOW!!!!!!!!!! thanks a lot.!!! Your a Genius.

sir can i have a favor? how can i make this like entering an output in a simultaneous way? and directly it will split the 5 numbers to have 3 spaces?

sir thanks a lot again...

## ddanbe 2,720

Don't call me a genius, I'm not. Perhaps it is common in your culture to call me sir, but I like to be called Danny, the guy from accross the street.
Here is a new version:

``````// gave a meaningfull name to my variable instead of naming it "a"
// initialized it to empty by using a method of the string class
string OutputString = string.Empty;
string InputString = string.Empty;

Console.WriteLine("Enter numbers");
while (true)
{