Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

how can i get this 123456789
1234 6789
123 789
12 89
1 9

Answer Posted / tanvir anwar

int n = 9; // you can use any odd number for similar pattern
int mid = (n+1)/2;
for (int i = 0; i < mid; i++)
{
for (int j = 1; j <= n; j++)
{
if (j <= mid-i || j >= mid+i)
Console.Write({0}, j);
else
Console.Write(" ");
}
Console.WriteLine();
}

Is This Answer Correct ?    10 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does the clr work?

968


Why do we need constructors?

955


Are c# objects passed by reference?

943


Explain About disco and uddi

1192


What is ienumerable and iqueryable?

967


Can you inherit from a sealed class?

968


Explain the different types of delegates used in c#.

999


In which order the constructor is called for an inherited class?

1123


Is dictionary reference type c#?

885


What is the difference between new and override in c#?

1050


Describe the parts of assembly.

1009


What is a scope in c#?

946


What is string programming language?

917


Is c# scripting language?

948


What is ienumerable t in c#?

917