Files
ed/Practica1/main.cpp

71 lines
1.4 KiB
C++
Raw Normal View History

2026-03-14 15:11:19 +01:00
#include <iostream>
#include <fstream>
#include "getch.cpp"
#include "estructuras.cpp"
2026-03-14 17:25:51 +01:00
using namespace std;
2026-03-14 17:25:51 +01:00
void clear(){
ifstream archivo("/etc/os-release");
2026-03-14 17:25:51 +01:00
if (archivo.good()) {
system("clear");
} else {
system("cls");
2026-03-18 12:56:46 +01:00
};
};
2026-03-14 17:25:51 +01:00
2026-03-18 12:56:46 +01:00
int main(){
char opcion='0';
while (opcion=='0')
{
clear();
2026-03-14 15:11:19 +01:00
cout<<"SANCIONES APP. MENU PRINCIPAL"<<endl;
cout<<"===================================="<<endl;
2026-03-18 12:56:46 +01:00
cout<<"Indroduce un numero entre 1 y 8"<<endl;
2026-03-14 15:11:19 +01:00
cout<<" 1. Consultar cehiculo."<<endl;
cout<<" 2. Añadir vehiculo."<<endl;
cout<<" 3. Mostrar radares."<<endl;
cout<<" 4. Mostrar radar."<<endl;
cout<<" 5. Procsar radar."<<endl;
cout<<" 6. Mostrar fichero de sanciones."<<endl;
cout<<" 7. Mostrar cuantia de sancion."<<endl;
cout<<" 8. Salir."<<endl;
cout<<"Introduce una opcion entre 1 y 8";
2026-03-14 15:11:19 +01:00
opcion=getch();
clear();
switch(opcion){
case '1':
cout<<"1"<<endl;
break;
case '2':
cout<<"2"<<endl;
break;
case '3':
cout<<"3"<<endl;
break;
case '4':
cout<<"4"<<endl;
break;
case '5':
cout<<"5"<<endl;
break;
case '6':
cout<<"6"<<endl;
break;
case '7':
cout<<"7"<<endl;
break;
case '8':
cout<<"8"<<endl;
return 0;
default:
opcion='0';
}
}
cout<<"salio"<<endl;
2026-03-14 15:11:19 +01:00
};