Prova Teorica 2013.06.21

From Sistemi Operativi
Revision as of 11:10, 8 May 2014 by MidoloM (talk | contribs)
Jump to navigation Jump to search

Testo del compito

Esercizio g.1

[soluzione]

Esercizio c.2

#Casi possibili delle iterazioni
int val = 0

PQPQQ (((val +1) *2) +1) * 2 * 2	 	12
PQQPQ (( val +1 ) * 2 * 2) +1 * 2		12
QQPQP (((val * 2 * 2) + 1 )* 2) + 1		3
QPQQP (((val * 2) + 1) * 2 * 2) + 1		5
QPQPQ ((((val * 2) + 1) * 2) + 1) * 2		6

a) 	#Quindi i valori possibili sono  (3, 5, 6, 12)
b)	#

- Midolo e Marangoni