<H1>Fondamenti di Programmazione a.a. 2009-2010 <SMALL>(canale E-O)</SMALL></H1> <BIG> Docente: Riccardo Silvestri <BR> Esercitatore: Paul Wollan <BR> </BIG> <H2>Laboratorio di mercoledì 7 ottobre 2009</H2> <DIV style="margin-left:5%; margin-right:10%"> <DIV ALIGN="justify"> <OL> <LI>Scrivete un programma che prende in input quattro interi e quindi visualizza la somma, la media, il prodotto, il più piccolo e il più grande di questi numeri. Per esempio: <PRE> Input four different integers: 4 6 8 10 Sum is: 28 Average is: 7 Product is: 1920 Smallest is: 4 Largest is: 10 </PRE></LI> <LI> Scrivete un programma che prende in input tre interi e li stampa in ordine crescente. Provate con quattro interi in input. </LI> <LI>Scrivete un programma (usando il <CODE>while</CODE>) per produrre la seguente tabella di valori: <PRE> A A+2 A+4 A+6 3 5 7 9 6 8 10 12 9 11 13 15 12 14 16 18 15 17 19 21 </PRE></LI> <LI>Scrivete un programma che legge un carattere <CODE>c</CODE> e un intero <CODE>n</CODE> e stampa un triangolo di altezza <CODE>n</CODE> fatto con caratteri <CODE>c</CODE>. Per esempio: <PRE> Input a character: * Input an integer: 4 * ** *** **** </PRE></LI> </OL> </DIV> </DIV>
This topic: Programmazione1
>
WebHome
>
FP_EO
>
FPdiario0910
>
FPlab071009
Topic revision: r1 - 2009-10-12 - RiccardoSilvestri
Copyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback