/* euro.c Convertitore EURO Copyright (C) 2001 Nicola Piazzolla This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Created By kc */ #include #include double euro; int variabile; /* Variabili */ double x; double risultato; int c; main () { printf("\t\tConvertitore Euro\n"); printf("|-------------------MENU----------------|\n"); printf("|Premere 1 per convertire da Euro a Lire|\n"); printf("|Premere 2 per convertire da Lire a Euro|\n"); printf("|Premere 3 per le INFO |\n"); printf("|Per uscire dare come input 000 |\n"); printf("|---------------------------------------|\n"); while (1) { scanf("%d",&variabile); if (variabile==3) { printf("Nick : kc ; email \n"); printf("IRC : server channel <#penguin.it> \n"); } if (variabile==1) { while (c != EOF) { printf("Inserire la somma in Euro\n"); scanf("%lg",&x); if(x==000) { printf("MENU PRINCIPALE : "); break;} euro=1936.270000; risultato=x*euro; printf("Il risultato in Lire e` %f\n",risultato); } } if(variabile==000) { printf("USCITA\n"); exit(1); } if (variabile==2) { while(c != EOF) { printf("Inserire la somma in Lire\n"); printf("\nL "); scanf("%lg",&x); if(x==000) { printf("MENU PRINCIPALE : "); break;} euro=1936.270000; risultato=x/euro; printf("Il risultato in Euro e` %f\n",risultato); } } }}