-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
72499d2
commit dac8029
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
// Usare IntelliSense per informazioni sui possibili attributi. | ||
// Al passaggio del mouse vengono visualizzate le descrizioni degli attributi esistenti. | ||
// Per altre informazioni, visitare: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Python: File corrente", | ||
"type": "python", | ||
"request": "launch", | ||
"program": "${file}", | ||
"console": "integratedTerminal" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#import | ||
import time | ||
|
||
print("benvenuto nel calcolatore autmatico dell'MCD") | ||
print("versione 0.0.1") | ||
time.sleep(1) | ||
print("per prima cosa inseriamo i numeri di cui vuoi calcolare l'MCD") | ||
#definizione varibili | ||
a1 = int(input('inserisci il primo numero ')) | ||
b1 = int(input('inserisci il secondo numero ')) | ||
a = a1 | ||
b = b1 | ||
print('grazie! ora eseguo i calcoli') | ||
time.sleep(1) | ||
|
||
|
||
#algoritmo | ||
|
||
while a != b: | ||
if a > b : | ||
a = a-b | ||
if b > a : | ||
b = b-a | ||
|
||
print("ho finito!") | ||
print("L'MCD tra " + str(a1) + " e " + str(b1) + " è: " + str(a)) | ||
|
||
|
||
|