Dsy Network www | forum | my | didattica | howto | wiki | el goog | stats | blog | dona | rappresentanti
Homepage
 Register   Calendar   Members  Faq   Search  Logout 
.dsy:it. : Powered by vBulletin version 2.3.1 .dsy:it. > Didattica > Corsi A - F > Fondamenti di architettura e programmazione > [secondo turno] Vecchio compitino
  Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
Reaper
Maestro Jedi

User info:
Registered: Oct 2005
Posts: 362 (0.05 al dì)
Location: Patagonia
Corso: ComDig
Anno: MOoooLto InDieTRO...
Time Online: 1 Day, 16:04:39 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
[secondo turno] Vecchio compitino

http://boldi.dsi.unimi.it/Corsi/FAP...l_prepcomp2.pdf

esercizio n°6..
non è sbagliato?

a me viene 4----9
e 4----3

ma ci sono anke gli array nel compitino? mica ci si fermava al break e continue?:?

15-12-2005 16:49
Click Here to See the Profile for Reaper Click here to Send Reaper a Private Message Find more posts by Reaper Add Reaper to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Reaper
Maestro Jedi

User info:
Registered: Oct 2005
Posts: 362 (0.05 al dì)
Location: Patagonia
Corso: ComDig
Anno: MOoooLto InDieTRO...
Time Online: 1 Day, 16:04:39 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

anke l'esercizio 7... sbaglio o non abbiamo ankora fatto i metodi statici?

15-12-2005 17:15
Click Here to See the Profile for Reaper Click here to Send Reaper a Private Message Find more posts by Reaper Add Reaper to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Lyanne
-perenne paranoia-

User info:
Registered: Oct 2005
Posts: 277 (0.04 al dì)
Location: Milano
Corso: Comunicatio
Anno: 3
Time Online: 3 Days, 5:08:44 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
Re: [secondo turno] Vecchio compitino

Originally posted by Reaper
http://boldi.dsi.unimi.it/Corsi/FAP...l_prepcomp2.pdf

esercizio n°6..
non è sbagliato?

a me viene 4----9
e 4----3

ma ci sono anke gli array nel compitino? mica ci si fermava al break e continue?:?


l'esercizio non è sbagliato solo che tu non tieni conto della lazy evaluation. in parole povere se tu hai due && o due || puoi anche saltare la seconda istruzione se puoi dire già per certo il valore di verità. il nostro esempio:
(y=x*3)%2==0 && (x++>0)
si vede che la prima parte è falsa quindi siccome ci troviamo in un and vuol dire che se almeno uno è falso tutta l'espressione è falsa quindi il programma non sta nemmeno a controllare la seconda parte e quindi non fa gli assegnamenti. quindi in questo caso y=9 (3*3) ma x=3 perché il programma non è riuscito a fare il ++.
al contrario per il secondo in quanto è presente solo un or e quindi il programma è costretto a fare entrambe le istruzioni.

Comunque di array ce ne saranno a bizzeffe. In bocca al lupo.

__________________
some photos of mine

15-12-2005 19:20
Click Here to See the Profile for Lyanne Click Here to See the Blog of Lyanne Click here to Send Lyanne a Private Message Find more posts by Lyanne Add Lyanne to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Reaper
Maestro Jedi

User info:
Registered: Oct 2005
Posts: 362 (0.05 al dì)
Location: Patagonia
Corso: ComDig
Anno: MOoooLto InDieTRO...
Time Online: 1 Day, 16:04:39 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

MAGGGGGICO!!! avevo seguito la lezione ma non mi ricordavo più! GRAZIE!
cmq speriamo bene x gli array!
in bocca al lupo anke a te! :)

15-12-2005 19:50
Click Here to See the Profile for Reaper Click here to Send Reaper a Private Message Find more posts by Reaper Add Reaper to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 14:56.    Post New Thread    Post A Reply
  Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread | Add to Bookmarks

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is ON
 

Powered by: vBulletin v2.3.1 - Copyright ©2000 - 2002, Jelsoft Enterprises Limited
Mantained by dsy crew (email) | Collabora con noi | Segnalaci un bug | Archive | Regolamento | Licenze | Thanks | Syndacate
Pagina generata in 0.027 seconds (86.35% PHP - 13.65% MySQL) con 29 query.