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 N - Z > Programmazione > [Alberti] Secondo Compitino
  Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
dafth
.fedelissimo.

User info:
Registered: Oct 2005
Posts: 48 (0.01 al dì)
Location:
Corso:
Anno:
Time Online: 5:15:16 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
[Alberti] Secondo Compitino

Sono uscite le risposte del secondo compitino, nell'esercizio numero 6 al 3° ciclo io mi trovo risultati diversi, per la precisione
num1 :1
num2 :14
num3 :10

ho anche scritto il codice e testato ed il risultato è sempre lo stesso

code:
public static void main(String arg[]) { final int MIN=3, LIMIT=6; int num1 =1 , num2=5, num3=9; do num2 += num3++; while (num3< LIMIT); System.out.println("num1 :"+num1); System.out.println("num2 :"+num2); System.out.println("num3 :"+num3); }

Mentre nel pdf della prof il risultato è:
num1 :1
num2 :13
num3 :10

Cosa ne pensate?? Avete lo stesso risultato voi?

15-12-2005 11:34
Click Here to See the Profile for dafth Click here to Send dafth a Private Message Find more posts by dafth Add dafth to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
johnnyd
.grande:maestro.

User info:
Registered: Sep 2005
Posts: 840 (0.11 al dì)
Location: Milano (Fragagnano)
Corso: Informatica
Anno: IV
Time Online: 13 Days, 22:13:29 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

emh...
io ho tenuto conto che i cicli fossero in sequenza quindi ho tutti i risultati sfasati tranne per il primo.!

Che nervi...

__________________
My Blog - My Photo Album

15-12-2005 16:13
Click Here to See the Profile for johnnyd Click Here to See the Blog of johnnyd Click here to Send johnnyd a Private Message Find more posts by johnnyd Add johnnyd to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Antonio86
.consigliere.

User info:
Registered: Oct 2005
Posts: 148 (0.02 al dì)
Location: Novara
Corso: Informatica
Anno: Primo
Time Online: 19:09:36 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

A me viene 14 anche matematicamente, sarà un errore di battitura

__________________
You byte the hand that feeds you

15-12-2005 19:08
Click Here to See the Profile for Antonio86 Click here to Send Antonio86 a Private Message Find more posts by Antonio86 Add Antonio86 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 02:44.    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.098 seconds (71.00% PHP - 29.00% MySQL) con 26 query.