C# Program to Print Triangle in Square
Program Statement:
Program Statement:
Write a program which display the following output on the screen.
####$####
###$#$###
##$###$##
#$#####$#
$#######$
Solution:
Solution:
13.991477012634277px;"> class shape
{
int x, y;
public void sh()
{
Console.WriteLine();
for (x = 1; x <= 5; x++)
{
for (y = 1; y <= 5 - x; y++)
{
Console.Write("#");
}
Console.Write("$");
for (y = 2; y <= x * 2 - 1; y++)
{
Console.Write("#");
}
Console.Write(" $");
for (y = 1; y <= 5 - x; y++)
{
Console.Write("#");
}
Console.WriteLine(" ");
}
}
}
{
int x, y;
public void sh()
{
Console.WriteLine();
for (x = 1; x <= 5; x++)
{
for (y = 1; y <= 5 - x; y++)
{
Console.Write("#");
}
Console.Write("$");
for (y = 2; y <= x * 2 - 1; y++)
{
Console.Write("#");
}
Console.Write(" $");
for (y = 1; y <= 5 - x; y++)
{
Console.Write("#");
}
Console.WriteLine(" ");
}
}
}
Related Posts by Categories
Money
- How Do You Get Paid To Walk
- Earn Extra Cash Jobs South Africa
- Survey Junkie Or Swagbucks
- How To Make Extra Money Fast 2018
- How To Earn Extra Money With Job In India
- Earn Money Quick Online Free
- Paid Survey Indonesia Terpercaya 2017
- How To Earn Money Online Dream11
- How To Earn Money On Online Surveys
- How To Earn Money Online Neteller
- Make Extra Money At Night
- Get Paid For Walking App Iphone
- Make Extra Money In Retirement
- Get Paid By Walking
- Earn Money Online From Android
- Survey Junkie Income
- Earn Money Online Instant
- How To Earn Money Online Doing Nothing
- Great Ways To Make Extra Money From Home
- Earn Extra Money Right Now
- How To Get Extra Money In Simcity Buildit
- Earn Extra Money Johannesburg
- How To Earn Extra Money In New Zealand
- How To Get Extra Income For Students
- Make Extra Money Amazon
in
- Top Ten Best Gaming Laptops in 2014
- 30 Magazine Submissions in 30 Days June Day 16 30Submissions30Days
- Top 10 Most Beautiful Birds in the World 2014
- 30 Magazine Submissions in 30 Days June Day 25 30Submissions30Days
- How to select Open Path and Unfilled Path in Adobe Illustrator CC
- 14 Most Important Tools to Learn in Adobe Illustrator for Beginners
- Why womens are not interested in Technology
- Universities in CANADA
- 30 Magazine Submissions in 30 Days June Day 8 30Submissions30Days
- 30 Magazine Submissions in 30 Days June Day 7 30Submissions30Days
- 30 Magazine Submissions in 30 Days June Day 17 30Submissions30Days
- Top 10 Ways to Score Higher in an Exams
- Putting My Book to Work Where Im Published in July 2015 ParentingMagazineWriting
- 6 Reasons Why Microstock Earning Will be Down in 2015
- 30 Magazine Submissions in 30 Days June Day 11 30Submissions30Days
- Top 10 Futurist Predictions in the World of Technology
- Program To Print Ascii Table in Assembly Language
- How To Automatically Stop Seeding in UTorrent
- 30 Magazine Submissions in 30 Days June Day 20 30Submissions30Days
- 30 Magazine Submissions in 30 Days June Day 9 30Submissions30Days
- 30 Magazine Submissions in 30 Days June Day 15 30Submissions30Days
- How to ADD Sharing Buttons in Blogger Blogspot Horizontal Vertical Buttons
- Weekly Writer Challenge 1 Check In
- program to Print Sum of factorial Series in C
- 30 Magazine Submissions in 30 Days June Day 4 30Submissions30Days
c
- C Program to display the different series output on the screen
- C Program which takes n values from user and then sort them using Bubble sort
- Download C 2010 For Programmers Fourth Edition by DEITEL DEVELOPER SERIES
- Convert C Coding into C Coding without using goto Statement
- C Program to find Area of Triangle
- C Program to check number is prime or composite
- C Program to Print Triangles
- C program to Check leap Year Using Conditional Statement
- C Program to check entered value is character integer or special symbol
- C Main Function for Calling all classes
- C Program to Print Fibonacci series
- C Simple Loop Program example to print characters
- Professional C 2008
- C program to print nth iteration using loops
- Array Problem Solving using C
- C program to Find Worker efficiency using if else statement
- program to Print Sum of factorial Series in C
- C Program to print Rectangle
- C Program which takes n values from user and then sort them in ascending order
- C program to print Factorial of all Prime numbers in csharp
- Program to print sum of factorial of Odd series in C
- C program to print nth iteration Csharp Programs
- C Program using Functions and loops
- C Program to find Student GPA and CGPA Concept of ENUM in C
0 komentar:
Posting Komentar