Challenge: Outputting a Triangle
Modify the code to print a triangle like the following:
***
**
*
main.cs
12345678910namespace ConsoleApp { internal class Program { static void Main(string[] args) { System.Console.WriteLine("***"); } } }
- Use three System.Console.WriteLine statements. One of them is already in the code.
main.cs
123456789101112namespace ConsoleApp { internal class Program { static void Main(string[] args) { System.Console.WriteLine("***"); System.Console.WriteLine("**"); System.Console.WriteLine("*"); } } }
Tutto è chiaro?
Grazie per i tuoi commenti!
Sezione 1. Capitolo 4
Chieda ad AI
Chieda ad AI
Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione
Suggested prompts:
Can you show me the code that needs to be modified?
What should I do if I want to print a larger triangle?
Can you explain why we use three separate WriteLine statements?
Awesome!
Completion rate improved to 1.59
Challenge: Outputting a Triangle
Scorri per mostrare il menu
Modify the code to print a triangle like the following:
***
**
*
main.cs
12345678910namespace ConsoleApp { internal class Program { static void Main(string[] args) { System.Console.WriteLine("***"); } } }
- Use three System.Console.WriteLine statements. One of them is already in the code.
main.cs
123456789101112namespace ConsoleApp { internal class Program { static void Main(string[] args) { System.Console.WriteLine("***"); System.Console.WriteLine("**"); System.Console.WriteLine("*"); } } }
Tutto è chiaro?
Grazie per i tuoi commenti!
Sezione 1. Capitolo 4