Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Challenge: Outputting a Triangle | Getting Started
C# Basics
course content

Course Content

C# Basics

C# Basics

1. Getting Started
2. Dealing with Data Types
3. Control Structures
4. Loops
5. Arrays
6. Methods

bookChallenge: Outputting a Triangle

Modify the code to print a triangle like the following:

cs

main

copy
12345678910
namespace ConsoleApp { internal class Program { static void Main(string[] args) { System.Console.WriteLine("***"); } } }
  1. Use three System.Console.WriteLine statements. One of them is already in the code.
cs

main

copy
123456789101112
namespace ConsoleApp { internal class Program { static void Main(string[] args) { System.Console.WriteLine("***"); System.Console.WriteLine("**"); System.Console.WriteLine("*"); } } }

Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 1. Chapter 4
We're sorry to hear that something went wrong. What happened?
some-alt