Cancellato variabile numPrec, rifatto con valori double
This commit is contained in:
parent
449d2f9510
commit
99a404eb07
4
.vscode/settings.json
vendored
Normal file
4
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"files.autoSaveDelay": 1,
|
||||||
|
"files.autoSave": "afterDelay"
|
||||||
|
}
|
||||||
@ -4,14 +4,13 @@ class Program
|
|||||||
{
|
{
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
int num, somma, numPrec;
|
double num, somma;
|
||||||
numPrec=0;
|
somma=0;
|
||||||
Console.WriteLine("Il programma sommerà i numeri finché non verrà inserito zero, poi restituirà il risultato.");
|
Console.WriteLine("Il programma sommerà i numeri finché non verrà inserito zero, poi restituirà il risultato.");
|
||||||
do{
|
do{
|
||||||
Console.Write("Inserire un numero: ");
|
Console.Write("Inserire un numero: ");
|
||||||
num=Convert.ToInt32(Console.ReadLine());
|
num=Convert.ToDouble(Console.ReadLine());
|
||||||
somma=num+numPrec;
|
somma=num+somma;
|
||||||
numPrec=num;
|
|
||||||
}
|
}
|
||||||
while(num!=0);
|
while(num!=0);
|
||||||
Console.WriteLine("La somma totale è: " + somma);
|
Console.WriteLine("La somma totale è: " + somma);
|
||||||
|
|||||||
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("sum_until_zero")]
|
[assembly: System.Reflection.AssemblyCompanyAttribute("sum_until_zero")]
|
||||||
[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+40a271ce3259361aa3d72b2e19fa828816efbf4d")]
|
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+449d2f95104c875ce405d864c6655cd4c26b3329")]
|
||||||
[assembly: System.Reflection.AssemblyProductAttribute("sum_until_zero")]
|
[assembly: System.Reflection.AssemblyProductAttribute("sum_until_zero")]
|
||||||
[assembly: System.Reflection.AssemblyTitleAttribute("sum_until_zero")]
|
[assembly: System.Reflection.AssemblyTitleAttribute("sum_until_zero")]
|
||||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
e5597b6c21ac407792aff76e127963df72106e8525e21665ab26cbd1ac5d1cd3
|
7c9836cd697e8fdfe702c15d3f02187e400574d7269d02a2039a3b42fa5f5f74
|
||||||
|
|||||||
@ -8,6 +8,6 @@ build_property.PlatformNeutralAssembly =
|
|||||||
build_property.EnforceExtendedAnalyzerRules =
|
build_property.EnforceExtendedAnalyzerRules =
|
||||||
build_property._SupportedPlatformList = Linux,macOS,Windows
|
build_property._SupportedPlatformList = Linux,macOS,Windows
|
||||||
build_property.RootNamespace = sum_until_zero
|
build_property.RootNamespace = sum_until_zero
|
||||||
build_property.ProjectDir = /home/BrainTheBest5/git/sum_until_zero/
|
build_property.ProjectDir = /mnt/Dati/Github Personal Repos/sum_until_zero/
|
||||||
build_property.EnableComHosting =
|
build_property.EnableComHosting =
|
||||||
build_property.EnableGeneratedComInterfaceComImportInterop =
|
build_property.EnableGeneratedComInterfaceComImportInterop =
|
||||||
|
|||||||
Binary file not shown.
@ -12,3 +12,17 @@
|
|||||||
/home/BrainTheBest5/git/sum_until_zero/obj/Debug/net8.0/sum_until_zero.pdb
|
/home/BrainTheBest5/git/sum_until_zero/obj/Debug/net8.0/sum_until_zero.pdb
|
||||||
/home/BrainTheBest5/git/sum_until_zero/obj/Debug/net8.0/sum_until_zero.genruntimeconfig.cache
|
/home/BrainTheBest5/git/sum_until_zero/obj/Debug/net8.0/sum_until_zero.genruntimeconfig.cache
|
||||||
/home/BrainTheBest5/git/sum_until_zero/obj/Debug/net8.0/ref/sum_until_zero.dll
|
/home/BrainTheBest5/git/sum_until_zero/obj/Debug/net8.0/ref/sum_until_zero.dll
|
||||||
|
/mnt/Dati/Github Personal Repos/sum_until_zero/obj/Debug/net8.0/sum_until_zero.GeneratedMSBuildEditorConfig.editorconfig
|
||||||
|
/mnt/Dati/Github Personal Repos/sum_until_zero/obj/Debug/net8.0/sum_until_zero.AssemblyInfoInputs.cache
|
||||||
|
/mnt/Dati/Github Personal Repos/sum_until_zero/obj/Debug/net8.0/sum_until_zero.AssemblyInfo.cs
|
||||||
|
/mnt/Dati/Github Personal Repos/sum_until_zero/obj/Debug/net8.0/sum_until_zero.csproj.CoreCompileInputs.cache
|
||||||
|
/mnt/Dati/Github Personal Repos/sum_until_zero/obj/Debug/net8.0/sum_until_zero.dll
|
||||||
|
/mnt/Dati/Github Personal Repos/sum_until_zero/obj/Debug/net8.0/refint/sum_until_zero.dll
|
||||||
|
/mnt/Dati/Github Personal Repos/sum_until_zero/obj/Debug/net8.0/sum_until_zero.pdb
|
||||||
|
/mnt/Dati/Github Personal Repos/sum_until_zero/bin/Debug/net8.0/sum_until_zero
|
||||||
|
/mnt/Dati/Github Personal Repos/sum_until_zero/bin/Debug/net8.0/sum_until_zero.deps.json
|
||||||
|
/mnt/Dati/Github Personal Repos/sum_until_zero/bin/Debug/net8.0/sum_until_zero.runtimeconfig.json
|
||||||
|
/mnt/Dati/Github Personal Repos/sum_until_zero/bin/Debug/net8.0/sum_until_zero.dll
|
||||||
|
/mnt/Dati/Github Personal Repos/sum_until_zero/bin/Debug/net8.0/sum_until_zero.pdb
|
||||||
|
/mnt/Dati/Github Personal Repos/sum_until_zero/obj/Debug/net8.0/sum_until_zero.genruntimeconfig.cache
|
||||||
|
/mnt/Dati/Github Personal Repos/sum_until_zero/obj/Debug/net8.0/ref/sum_until_zero.dll
|
||||||
|
|||||||
Binary file not shown.
@ -1 +1 @@
|
|||||||
03f691184b3236b6140e8666561b0933ea4f12d4614485df8b6933195082f12d
|
91b5808dba5b7ebef7dbb98ec635742aaa84fcc02a4349ebdc9e61486064199b
|
||||||
|
|||||||
Binary file not shown.
@ -13,11 +13,11 @@
|
|||||||
"project": {
|
"project": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"restore": {
|
"restore": {
|
||||||
"projectUniqueName": "/home/BrainTheBest5/git/sum_until_zero/sum_until_zero.csproj",
|
"projectUniqueName": "/mnt/Dati/Github Personal Repos/sum_until_zero/sum_until_zero.csproj",
|
||||||
"projectName": "sum_until_zero",
|
"projectName": "sum_until_zero",
|
||||||
"projectPath": "/home/BrainTheBest5/git/sum_until_zero/sum_until_zero.csproj",
|
"projectPath": "/mnt/Dati/Github Personal Repos/sum_until_zero/sum_until_zero.csproj",
|
||||||
"packagesPath": "/home/BrainTheBest5/.nuget/packages/",
|
"packagesPath": "/home/BrainTheBest5/.nuget/packages/",
|
||||||
"outputPath": "/home/BrainTheBest5/git/sum_until_zero/obj/",
|
"outputPath": "/mnt/Dati/Github Personal Repos/sum_until_zero/obj/",
|
||||||
"projectStyle": "PackageReference",
|
"projectStyle": "PackageReference",
|
||||||
"configFilePaths": [
|
"configFilePaths": [
|
||||||
"/home/BrainTheBest5/.nuget/NuGet/NuGet.Config"
|
"/home/BrainTheBest5/.nuget/NuGet/NuGet.Config"
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"version": 2,
|
"version": 2,
|
||||||
"dgSpecHash": "JQDSAqNNx/E=",
|
"dgSpecHash": "K8EPKrIdZ7k=",
|
||||||
"success": true,
|
"success": true,
|
||||||
"projectFilePath": "/home/BrainTheBest5/git/sum_until_zero/sum_until_zero.csproj",
|
"projectFilePath": "/mnt/Dati/Github Personal Repos/sum_until_zero/sum_until_zero.csproj",
|
||||||
"expectedPackageFiles": [
|
"expectedPackageFiles": [
|
||||||
"/home/BrainTheBest5/.nuget/packages/microsoft.aspnetcore.app.ref/8.0.10/microsoft.aspnetcore.app.ref.8.0.10.nupkg.sha512"
|
"/home/BrainTheBest5/.nuget/packages/microsoft.aspnetcore.app.ref/8.0.10/microsoft.aspnetcore.app.ref.8.0.10.nupkg.sha512"
|
||||||
],
|
],
|
||||||
|
|||||||
@ -1,17 +1,17 @@
|
|||||||
{
|
{
|
||||||
"format": 1,
|
"format": 1,
|
||||||
"restore": {
|
"restore": {
|
||||||
"/home/BrainTheBest5/git/sum_until_zero/sum_until_zero.csproj": {}
|
"/mnt/Dati/Github Personal Repos/sum_until_zero/sum_until_zero.csproj": {}
|
||||||
},
|
},
|
||||||
"projects": {
|
"projects": {
|
||||||
"/home/BrainTheBest5/git/sum_until_zero/sum_until_zero.csproj": {
|
"/mnt/Dati/Github Personal Repos/sum_until_zero/sum_until_zero.csproj": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"restore": {
|
"restore": {
|
||||||
"projectUniqueName": "/home/BrainTheBest5/git/sum_until_zero/sum_until_zero.csproj",
|
"projectUniqueName": "/mnt/Dati/Github Personal Repos/sum_until_zero/sum_until_zero.csproj",
|
||||||
"projectName": "sum_until_zero",
|
"projectName": "sum_until_zero",
|
||||||
"projectPath": "/home/BrainTheBest5/git/sum_until_zero/sum_until_zero.csproj",
|
"projectPath": "/mnt/Dati/Github Personal Repos/sum_until_zero/sum_until_zero.csproj",
|
||||||
"packagesPath": "/home/BrainTheBest5/.nuget/packages/",
|
"packagesPath": "/home/BrainTheBest5/.nuget/packages/",
|
||||||
"outputPath": "/home/BrainTheBest5/git/sum_until_zero/obj/",
|
"outputPath": "/mnt/Dati/Github Personal Repos/sum_until_zero/obj/",
|
||||||
"projectStyle": "PackageReference",
|
"projectStyle": "PackageReference",
|
||||||
"configFilePaths": [
|
"configFilePaths": [
|
||||||
"/home/BrainTheBest5/.nuget/NuGet/NuGet.Config"
|
"/home/BrainTheBest5/.nuget/NuGet/NuGet.Config"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user