Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*include*/
- #include <stdio.h>
- #include <stdlib.h>
- #include <malloc.h>
- #include <time.h>
- #include <string.h>
- /*define*/
- #define N 20
- /*strutture*/
- struct xxx {
- -
- -
- struct xxx *next;
- };
- /*funzioni*/
- int menu(struct card *);
- -
- -
- /*main*/
- int main()
- {
- /*inizializzazioni*/
- -
- -
- /*corpo del main*/
- while(1){
- switch(menu()){
- case 0: return 0;
- case 1:{ -; break;}
- case 2:{ -; break;}}
- default:{ printf("\n\nOpzione non ammessa!"); getchar();}
- }}
- }
- /*Funzione menu'*/
- int menu(struct listino *p, struct ricambi *pr)
- {
- int opz=-1;
- system("cls"); printf("\n");
- while(opz<0 || opz>2){
- if(p==NULL && pr==NULL) printf("\n1. carica database\n");
- else printf("\n1. database caricato\n");
- printf("\n2. cerca modello\n\n0. esci\t");
- scanf("%d", &opz); if(opz<0 || opz>2){ system("cls"); getchar();
- printf("!!!Inserire opzione corretta!\n");}}
- return opz;
- }
- /*Funzioni*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement