Login to ZARP





View BBCode Back »

Its not urgent but I am having issues, I am currently learning how to code C#.
My exercise is to write a program that draws a triangle of numbers from 1 to Max (chosen by the user, Max
must be a positive number) with for each of them the numbers that precede them (up to 1).

Please don't call me stupid when I am about to show the program that I done:

{
Console.WriteLine("Jusqu'a quel nombre?");
nb1 = Convert.ToInt32(Console.ReadLine());
for (i = nb1; i <= nb1; i = nb1 - 1 )
{
for (f = 1; i <= f; f++)
{
Console.Write(nb1);
}
Console.Write("\n");
}
}

I know this is hella wrong, but I am learning.
If you are good at coding C# it would be nice that you explain to me. That would be epic.

BBCode


Time to create page: 0.116 seconds

205 PLAYERS ONLINE

Connect to server View Gametracker DarkRP
8/127
Online
Connect to server View Gametracker Deathrun
0/40
Online
Connect to server View Gametracker TTT
0/47
Online
Connect to server View Gametracker Bhop
0/32
Online
Connect to server View Gametracker Surf
3/32
Online
Connect to server View Gametracker Prop Hunt
0/42
Online
Connect to server View Gametracker Sandbox
0/42
Online
Connect to server Discord
194/971
Online
Top