Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Défi : Affichage d’un Triangle | Démarrage
Quizzes & Challenges
Quizzes
Challenges
/
Bases de C#

bookDéfi : Affichage d’un Triangle

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("*"); } } }
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 1. Chapitre 4

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

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?

bookDéfi : Affichage d’un Triangle

Glissez pour afficher le menu

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("*"); } } }
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 1. Chapitre 4
some-alt