Opzione 3
This commit is contained in:
14
Program.cs
14
Program.cs
@@ -4,14 +4,14 @@ class Program {
|
||||
static void Main(string[] args) {
|
||||
Console.Clear();
|
||||
|
||||
char unit = '*'; //unità usata per stampare il quadrato
|
||||
char unit = '*'; //unità usata per stampare le figure
|
||||
|
||||
int scelta = -1;
|
||||
do {
|
||||
Console.WriteLine("Scegliere un'opzione:");
|
||||
Console.WriteLine("1. Stampa quadrato pieno");
|
||||
Console.WriteLine("2. Stampa quadrato vuoto");
|
||||
Console.WriteLine("3. Stampa ");
|
||||
Console.WriteLine("3. Stampa triangolo");
|
||||
Console.WriteLine("4. Stampa ");
|
||||
Console.WriteLine("0. Esci");
|
||||
Console.Write("Scelta: ");
|
||||
@@ -31,6 +31,7 @@ class Program {
|
||||
Pausa();
|
||||
break;
|
||||
case 3:
|
||||
Triangolo(Dimensione(), unit);
|
||||
Pausa();
|
||||
break;
|
||||
case 4:
|
||||
@@ -110,4 +111,13 @@ class Program {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void Triangolo(uint p_dimensione, char p_unit) {
|
||||
for (int i = 1; i <= p_dimensione; i++) {
|
||||
for (int j = 1; j <= i; j++) {
|
||||
Console.Write(p_unit);
|
||||
}
|
||||
Console.WriteLine("");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -13,7 +13,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("vacanzeEstive_sezione1")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+2271330afcc714879fddd060be9d9b4c8d23d1a2")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+2f640465ecbd3037171ec0a9bd282a674c8a7dd1")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("vacanzeEstive_sezione1")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("vacanzeEstive_sezione1")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
@@ -1 +1 @@
|
||||
a7ff05277b169b48ae0ee3771129af062cecaf54cccf9c5174bb421732abf751
|
||||
9cba433da9da8ea59d624971f030b8e8bdd284797161d60c7f99bfa12d4021a0
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user