Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Udfordring: Udskrivning af en Trekant | Kom Godt I Gang
Quizzes & Challenges
Quizzes
Challenges
/
C# Grundlæggende

bookUdfordring: Udskrivning af en Trekant

Modify the code to print a triangle like the following:

***
**
*
main.cs

main.cs

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.
main.cs

main.cs

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

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 1. Kapitel 4

Spørg AI

expand

Spørg AI

ChatGPT

Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat

Suggested prompts:

Can you show me the code that needs to be modified?

What does the current output of the code look like?

Do you want an explanation of how the triangle pattern works?

bookUdfordring: Udskrivning af en Trekant

Stryg for at vise menuen

Modify the code to print a triangle like the following:

***
**
*
main.cs

main.cs

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.
main.cs

main.cs

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

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 1. Kapitel 4
some-alt