/* Convertitore di velocita` da Kmh a Mph e viceversa. 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 int x ; int y ; int scelta; int converte; main () { printf("\t\tCONVERTITORE VELOCITA`\n"); printf("*************************************************\n"); printf("*Convertitore Velocita' da kmh a mph e viceversa*\n"); printf("*Scegliere con 1 per convertire da kmh a mph *\n"); printf("*Scegliere con 2 per convertire da mph a kmh *\n"); printf("*Scegliere con 3 per le INFO *\n"); printf("*Premere 000 per uscire *\n"); printf("*************************************************\n"); while(1) { scanf("%d",&scelta); if(scelta==000) { printf("USCITA\n"); exit(1); } if(scelta==3) { printf("Nick : kc ; email : \n"); printf("IRC: server channel <#penguin.it> \n"); } if (scelta==1) { while(1){ printf ("Inserire la velocita' in Kmh\n"); printf("\nKmh "); scanf("%d",&x); if(x==000) { printf("MENU PRINCIPALE :"); break; } converte=x/1.609344; printf("La velocita' in mph e' %d\n",converte); puts (" " ); } } if (scelta==2) { while(1){ printf("Inserire la velocita' in Mph\n"); printf("\nMph "); scanf("%d",&y); if(y==000) { printf("MENU PRINCIPALE :"); break; } converte=y*1.609344; printf("La velocita' in kmh e' %d\n",converte); puts(""); } } } }