Quinto elemento funzionante
This commit is contained in:
parent
7ba7b81980
commit
6ef3c92bfe
27
Program.cs
27
Program.cs
@ -6,9 +6,9 @@ class Program
|
|||||||
{
|
{
|
||||||
|
|
||||||
uint scelta;
|
uint scelta;
|
||||||
double celsius, fahrenheit;
|
double celsius, fahrenheit, divisore, dividendo;
|
||||||
int numero, quadrato, negativo, assoluto;
|
int numero, quadrato, negativo, assoluto;
|
||||||
bool exit=false, pari;
|
bool exit=false, pari, divisibile;
|
||||||
|
|
||||||
Console.Clear();
|
Console.Clear();
|
||||||
do{
|
do{
|
||||||
@ -69,6 +69,21 @@ class Program
|
|||||||
Console.Clear();
|
Console.Clear();
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
|
Console.Clear();
|
||||||
|
Console.Write("Inserire il dividendo: ");
|
||||||
|
dividendo=Convert.ToInt32(Console.ReadLine());
|
||||||
|
Console.Write("Inserire il divisore: ");
|
||||||
|
divisore=Convert.ToInt32(Console.ReadLine());
|
||||||
|
divisibile=VerificaDivisibile(dividendo,divisore);
|
||||||
|
if (divisibile==true){
|
||||||
|
Console.WriteLine("Il numero " +dividendo + " è divisibile per " +divisore);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
Console.WriteLine("Il numero " +dividendo + " non è divisibile per " +divisore);
|
||||||
|
}
|
||||||
|
Console.WriteLine("Premere invio per continuare . . .");
|
||||||
|
Console.ReadLine();
|
||||||
|
Console.Clear();
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
exit=true;
|
exit=true;
|
||||||
@ -103,4 +118,12 @@ class Program
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
static bool VerificaDivisibile(double p_dividendo, double p_divisore){
|
||||||
|
if (p_dividendo%p_divisore==0){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@ -13,7 +13,7 @@ using System.Reflection;
|
|||||||
[assembly: System.Reflection.AssemblyCompanyAttribute("miscellanea")]
|
[assembly: System.Reflection.AssemblyCompanyAttribute("miscellanea")]
|
||||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+8d7b26661d5591a9d008786305e66a141d43841a")]
|
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+7ba7b81980177f67f02957fc7927b07fbe320f9e")]
|
||||||
[assembly: System.Reflection.AssemblyProductAttribute("miscellanea")]
|
[assembly: System.Reflection.AssemblyProductAttribute("miscellanea")]
|
||||||
[assembly: System.Reflection.AssemblyTitleAttribute("miscellanea")]
|
[assembly: System.Reflection.AssemblyTitleAttribute("miscellanea")]
|
||||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
a641cf65aa001c293b1228046a124937b0e511f5c570f7cf40b37768407d155f
|
03707c09f63468c9a7dd5dc5b526deca7119451a9080efc2c2b4f585d9ef2bcd
|
||||||
|
|||||||
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