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 > Algoritmi e strutture dati > [LAB] Esercizi prova lab. 11/09/2015
  Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
imran3
.novellino.

User info:
Registered: Jan 2014
Posts: 8 (0.00 al dì)
Location:
Corso: Informatica F1X
Anno:
Time Online: 5:18:32 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
[LAB] Esercizi prova lab. 11/09/2015

Volevo ricambiare il favore, perciò ecco a voi gli esercizi della prova di lab.
4 domanda, 2 ore e 15 minuti di tempo

1.Print particolare (1 Punto)
Leggere intero n(assumere n>=3) e stampare output cosi:
ESEMPIO


E cosi via per gli altri n....

2.CIFRARIO VIGENERE (1 Punto)
Leggere parola chiave( max 10 caratteri)
Leggere un testo(assumere sia già in maiuscolo) di lunghezza non arbitraria(allocazione dinamica).
Cifrare con chiave usando vigenere
ESEMPIO:
INPUT:
VERME
RAPPORTOIMMEDIATO
OUTPUT
MEGBSMXFUQHIUUEOS


3.Parola piu lunga (2 Punti)
Leggere una sequenza di parole da riga di comando(in args)
Scrivere una funzione che ritorna un puntatore alla parola piu lunga (se ci sono piu parole con lunghezza massima, ritornare la prima)
Nel main chiamare la funzione e stampare la parola
ESEMPIO
input: ciao come va oggi?
output: come


4.Print lista concatenata (4 Punti)
Leggere sequenza di interi terminata da 0, memorizzarli in una lista concatenata.
La lunghezza della lista è arbitraria (non fare ipotesi su lunghezza massima).
Stampara i numeri della lista secondo l'ordine crecente

ESEMPIO:
input
1 4 2 5 2 5 62 61 35 1
output
1 1 2 2 4 5 5 35 61 52


nota: al esame si possono usare i comandi "make soluzione" e "make test", comandi che usa la prof per verificare il funzionamento del programma. (make soluzione compila e make test testa il programma con gli input test definti dalla prof. Davvero utili per avere la conferma del funzionamento corretto. (make test dice anche le eventuali differenze tra output atteso e quello prodotto dal programma)

Last edited by imran3 on 15-09-2015 at 13:24

11-09-2015 19:37
Click Here to See the Profile for imran3 Click here to Send imran3 a Private Message Find more posts by imran3 Add imran3 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Cronovirus
dsy core staff

User info:
Registered: Jun 2012
Posts: 471 (0.10 al dì)
Location:
Corso: Magistrale in Informatica
Anno: 2
Time Online: 4 Days, 2:45:03: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Grazie per la condivisione :)

12-09-2015 09:59
Click Here to See the Profile for Cronovirus Click here to Send Cronovirus a Private Message Find more posts by Cronovirus Add Cronovirus to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
lem_123
.primate.

User info:
Registered: Jan 2013
Posts: 65 (0.02 al dì)
Location:
Corso:
Anno:
Time Online: 6:48:28 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
Re: [LAB] Esercizi prova lab. 11/09/2015

Originally posted by imran3
Volevo ricambiare il favore, perciò ecco a voi gli esercizi della prova di lab.
4 domanda, 2 ore e 15 minuti di tempo

1.Print particolare
Leggere intero n(assumere n>=3) e stampare output cosi:
ESEMPIO


E cosi via per gli altri n....

2.CIFRARIO VIGENERE
Leggere parola chiave( max 10 caratteri)
Leggere un testo(assumere sia già in maiuscolo) di lunghezza non arbitraria(allocazione dinamica).
Cifrare con chiave usando vigenere
ESEMPIO:
INPUT:
VERME
RAPPORTOIMMEDIATO
OUTPUT
MEGBSMXFUQHIUUEOS


3.Parola piu lunga
Leggere una sequenza di parole da riga di comando(in args)
Scrivere una funzione che ritorna un puntatore alla parola piu lunga (se ci sono piu parole con lunghezza massima, ritornare la prima)
Nel main chiamare la funzione e stampare la parola
ESEMPIO
input: ciao come va oggi?
output: come


4.Print lista concatenata
Leggere sequenza di interi terminata da 0, memorizzarli in una lista concatenata.
La lunghezza della lista è arbitraria (non fare ipotesi su lunghezza massima).
Stampara i numeri della lista secondo l'ordine crecente

ESEMPIO:
input
1 4 2 5 2 5 62 61 35 1
output
1 1 2 2 4 5 5 35 61 52


nota: al esame si possono usare i comandi "make soluzione" e "make test", comandi che usa la prof per verificare il funzionamento del programma. (make soluzione compila e make test testa il programma con gli input test definti dalla prof. Davvero utili per avere la conferma del funzionamento corretto. (make test dice anche le eventuali differenze tra output atteso e quello prodotto dal programma)


ma su vigenere dovevi sapere la formula per potere dare una soluzione. Era presente nel testo?
Erano solo 4 quesiti?

15-09-2015 12:16
Click Here to See the Profile for lem_123 Click here to Send lem_123 a Private Message Find more posts by lem_123 Add lem_123 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
imran3
.novellino.

User info:
Registered: Jan 2014
Posts: 8 (0.00 al dì)
Location:
Corso: Informatica F1X
Anno:
Time Online: 5:18:32 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Ti spiega come effettuare la trasformazione del testo usando il "verme" (chiave)
Ovviamente dovevi arrivarci da solo come farlo col codice (ricavare la "formula")
Si erano solo questi 4
Punti in ordine di esercizio: 1, 1, 2, 4

15-09-2015 13:23
Click Here to See the Profile for imran3 Click here to Send imran3 a Private Message Find more posts by imran3 Add imran3 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
rogerino
.novellino.

User info:
Registered: Jun 2010
Posts: 2 (0.00 al dì)
Location:
Corso:
Anno:
Time Online: 13:10:02: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

qualcuno sa l'orario della prova di laboratorio di domani?

07-01-2016 21:34
Click Here to See the Profile for rogerino Click here to Send rogerino a Private Message Find more posts by rogerino Add rogerino to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
lem_123
.primate.

User info:
Registered: Jan 2013
Posts: 65 (0.02 al dì)
Location:
Corso:
Anno:
Time Online: 6:48:28 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Scusate qualcuno ha la soluzione a questi esercizi?

21-01-2017 09:47
Click Here to See the Profile for lem_123 Click here to Send lem_123 a Private Message Find more posts by lem_123 Add lem_123 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
m.m
.novellino.

User info:
Registered: Oct 2016
Posts: 2 (0.00 al dì)
Location:
Corso:
Anno:
Time Online: 2:37:23 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by lem_123
Scusate qualcuno ha la soluzione a questi esercizi?

ciao lem, questa è una possibile soluzione del primo esercizio

Attachment: es.c
This has been downloaded 16 time(s).

25-01-2017 12:43
Click Here to See the Profile for m.m Click here to Send m.m a Private Message Find more posts by m.m Add m.m to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
lem_123
.primate.

User info:
Registered: Jan 2013
Posts: 65 (0.02 al dì)
Location:
Corso:
Anno:
Time Online: 6:48:28 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by m.m
ciao lem, questa è una possibile soluzione del primo esercizio


grazie ora controllo se abbiamo fatto allo stesso modo

25-01-2017 15:25
Click Here to See the Profile for lem_123 Click here to Send lem_123 a Private Message Find more posts by lem_123 Add lem_123 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
lem_123
.primate.

User info:
Registered: Jan 2013
Posts: 65 (0.02 al dì)
Location:
Corso:
Anno:
Time Online: 6:48:28 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by lem_123
grazie ora controllo se abbiamo fatto allo stesso modo


mia soluzione:
//Print particolare (1 Punto)

#include<stdio.h>

int main(void)
{
int n,spazi,i,x;
int prima=0;

printf("inserisci un numero:");
scanf("%d", &n);
spazi=n+1;

for (i=0;i<n;i++)
{
if((n-i)<=3)
{
for(x=0;x<prima;x++)
printf(" ");
printf("*");
prima++;
}
for(x=1;x<=spazi-i-prima;x++)
printf(" ");
if (i<n-1)
printf("*\n");
}
return 0;
}

25-01-2017 15:37
Click Here to See the Profile for lem_123 Click here to Send lem_123 a Private Message Find more posts by lem_123 Add lem_123 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 12:24.    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.040 seconds (75.56% PHP - 24.44% MySQL) con 27 query.