Question

PLEASE DO THIS IN C #.Design and implement a program (name it Shape) that uses nested...

PLEASE DO THIS IN C #.Design and implement a program (name it Shape) that uses nested for loops to printout the shape shown below. Document your code.

         *

        ***

       *****

     *******

     *********

    ***********

   *************

***************

0 0
Add a comment Improve this question Transcribed image text
Answer #1

using System;
public class Shape
{
public static void Main(string[] args)
{
int i,j,k,l,n;   
Console.Write("Enter Integer value: ");
n= int.Parse(Console.ReadLine());
Console.Write("\n");
for(i=1; i<=n; i++)
{
for(j=1; j<=n-i; j++)
{
Console.Write(" ");
}
for(k=1;k<=i;k++)
{
Console.Write("*");
}
for(l=i-1;l>=1;l--)
{
Console.Write("*");
}
Console.Write("\n");
}   
}
}

Add a comment
Know the answer?
Add Answer to:
PLEASE DO THIS IN C #.Design and implement a program (name it Shape) that uses nested...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • PLEASE DO IN PYTHON Program 2: Design (pseudocode) and implement (source code) a program (name it...

    PLEASE DO IN PYTHON Program 2: Design (pseudocode) and implement (source code) a program (name it FeetMeters) to display a conversion tables for feet and meter as show below. Document your code and properly. Feet Meter 1.0 0.305 2.0 0.610 3.0 0.915 . . . . . . 19.0 5.7.95 20.0 6.100 Meter Feet 1.0 3.279 2.0 6.558 3.0 9.837 . . . . . . 19.0 62.301 20.0 65.574 The program defines the following methods: Method feetToMeter() converts from...

  • Do this in Python please Program 2: Design (pseudocode) and implement (source code) a program (name...

    Do this in Python please Program 2: Design (pseudocode) and implement (source code) a program (name it FeetMeters) to display a conversion tables for feet and meter as show below. Document your code and properly. Feet Meter 1.0 0.305 2.0 0.610 3.0 0.915 . . . . . . 19.0 5.7.95 20.0 6.100 Meter Feet 1.0 3.279 2.0 6.558 3.0 9.837 . . . . . . 19.0 62.301 20.0 65.574 The program defines the following methods: Method feetToMeter() converts...

  • Design (pseudocode)(name it Pattern) that uses nested loops to print out the following pattern. Document your...

    Design (pseudocode)(name it Pattern) that uses nested loops to print out the following pattern. Document your code properly. 1 2 3 4 5 6 1 2 3 4 5     1 2 3 4       1 2 3         1 2           1

  • Write a Java program (name it SandClock) that uses nested loops to print out the following...

    Write a Java program (name it SandClock) that uses nested loops to print out the following shape (sand clock). * *** ***** ******* *********

  • C# Design and implement a program (name it PalindromeInteger), to check if an integer value is...

    C# Design and implement a program (name it PalindromeInteger), to check if an integer value is a palindrome or not, using 2 methods (reverse and isPalindrome) specified as follows: Method reverse(int number) takes integer number and returns number in reverse order. The method mathematically reverses the number. Method isPalindrome(int number) takes integer number and returns true if the number is palindrome; false otherwise. Use method reverse() to implement method isPalindrome(). Notice that an integer value is palindrome if the value...

  • IN C++ PLEASE!!!! Design and implement a program (name it SumValue) that reads three integers (say...

    IN C++ PLEASE!!!! Design and implement a program (name it SumValue) that reads three integers (say X, Y, and Z) and prints out their values on separate lines with proper labels, followed by their average with proper label. Comment your code properly.

  • PLEASE DO THIS IN C#.Design and implement a program (name it ProcessGrades) that reads from the...

    PLEASE DO THIS IN C#.Design and implement a program (name it ProcessGrades) that reads from the user four integer values between 0 and 100, representing grades. The program then, on separate lines, prints out the entered grades followed by the highest grade, lowest grade, and averages of all four grades. Format the outputs following the sample runs below. Sample run 1: You entered: 95, 80, 100, 70 Highest grade: 100 Lowest grade: 70 Average grade: 86.25

  • Please do in C# with the code available to copy :) Program 4: Design (pseudocode) and...

    Please do in C# with the code available to copy :) Program 4: Design (pseudocode) and implement (source code) a program (name it MinMaxAvg) to determine the highest grade, lowest grade, and the average of all grades in a 4-by-4 two-dimensional arrays of integer grades (representing 4 students’ grades on 4 tests). The program main method populates the array (name it Grades) with random grades between 0 and 100 and then displays the grades as shown below. The main method...

  • C++ Design and implement a program (name it PalindromeInteger), to check if an integer value is...

    C++ Design and implement a program (name it PalindromeInteger), to check if an integer value is a palindrome or not, using 2 methods (reverse and isPalindrome) specified as follows: Method reverse(int number) takes integer number and returns number in reverse order. The method mathematically reverses the number. Method isPalindrome(int number) takes integer number and returns true if the number is palindrome; false otherwise. Use method reverse() to implement method isPalindrome(). Notice that an integer value is palindrome if the value...

  • Python please! Exercise #3: Design and implement a program (name it ArrayMethods), that defines 4 methods...

    Python please! Exercise #3: Design and implement a program (name it ArrayMethods), that defines 4 methods as follows: int arrayMax(int[] arr) returns the maximum value in the an array int arrayMin(int[] arr) returns the minimum value in an array void arraySquared(int[] arr) changes every value in the array to its square (value²) void arrayReverse(int[] arr) reverses the array (for example: array storing 7 8 9 becomes 9 8 7 ) The program main method creates a single-dimensional array of length...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT