Voce menù 3(?)
This commit is contained in:
parent
8998300294
commit
e303acca00
34
Program.cs
34
Program.cs
@ -7,6 +7,9 @@ class Program
|
||||
Console.Clear();
|
||||
int scelta=4, numero=0, divisore=13;
|
||||
uint dimensione=0;
|
||||
const int costante1 = 2;
|
||||
const int costante2 = 3;
|
||||
|
||||
|
||||
|
||||
do{
|
||||
@ -71,6 +74,37 @@ class Program
|
||||
Console.Clear();
|
||||
break;
|
||||
case 3:
|
||||
Console.Clear();
|
||||
Console.Write("Quanti numeri inserire nella prima lista? ");
|
||||
dimensione=Convert.ToUInt32(Console.ReadLine());
|
||||
int[] array3=new int[dimensione];
|
||||
Console.WriteLine("Inserire i numeri della prima lista:");
|
||||
for(int i=0; i<dimensione; i++){
|
||||
array3[i]=Convert.ToInt32(Console.ReadLine());
|
||||
}
|
||||
Console.Clear();
|
||||
Console.Write("Quanti numeri inserire nella seconda lista? ");
|
||||
dimensione=Convert.ToUInt32(Console.ReadLine());
|
||||
int[] array4=new int[dimensione];
|
||||
Console.WriteLine("Inserire i numeri della seconda lista:");
|
||||
for(int i=0; i<dimensione; i++){
|
||||
array4[i]=Convert.ToInt32(Console.ReadLine());
|
||||
}
|
||||
int[] array5=new int[array3.Length+array4.Length];
|
||||
for(int i=0; i<array3.Length; i++){
|
||||
array5[i]=array3[i]*costante1;
|
||||
}
|
||||
for(int i=0; i<array4.Length; i++){
|
||||
array5[i+array3.Length]=array4[i]*costante2;
|
||||
}
|
||||
Console.Clear();
|
||||
Console.WriteLine("I numeri inseriti sono: ");
|
||||
for(int i=0; i<array5.Length; i++){
|
||||
Console.WriteLine(array5[i]);
|
||||
}
|
||||
Console.WriteLine("Premere invio per continuare");
|
||||
Console.ReadLine();
|
||||
Console.Clear();
|
||||
break;
|
||||
default:
|
||||
Console.WriteLine("Scelta non valida.");
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -13,7 +13,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("array_2")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+5444cc5d132b343b7312c7866c9a2e52504df842")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+89983002949f9576da7f755a42ebba8430258d82")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("array_2")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("array_2")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
@ -1 +1 @@
|
||||
37073decbccccd6300f9aaab13ef34a3e888a8b16abc219f7d6af8aac09d6903
|
||||
090d847716a9a690dde9ff1bc249c462d39265c35a0e93cb06caeffe49a96b63
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user