Created
December 1, 2016 11:13
-
-
Save paolorotolo/7cfe4c9339378d281af5354eb5ad5cf6 to your computer and use it in GitHub Desktop.
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
faiScegliere(); | |
function f = faiScegliere() | |
scelta = input('Metti input [1 media - 2 massimo e minimo - 3 potenza]: '); | |
if scelta == 1 | |
disp(strcat('La media è:', int2str(media()))) | |
elseif scelta == 2 | |
disp('Massimo e minimo') | |
disp('Funzionalità non ancora disponibile...') | |
% Fatevelo voi | |
elseif scelta == 3 | |
disp('Potenza') | |
disp('Funzionalità non ancora disponibile...') | |
% Fatevelo voi | |
else | |
disp('Hai sbagliato, ritenta...') | |
faiScegliere(); | |
end | |
f = 'NON SERVOOOO PERCHÈ MATLAABBBB'; | |
end | |
function m = media() | |
numeri = input('Quanti numeri vuoi mettere??') | |
somma = 0; | |
for i=1:numeri | |
somma= somma + input(strcat('Metti il numero', ' ', int2str(i), ':')); | |
end | |
m = somma/numeri; | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment