Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Practica3_3
- {
- class PruebaManual
- {
- static void Main(string[] args)
- {
- Reserva bk1 = new Reserva();
- Console.Write("Introduzca el NIF (8 caracteres + 1 letra):");
- bk1.Nif = Console.ReadLine();
- Console.Write("Intrdoduzca el número de plazas que desea reservar (1 a 50):");
- bk1.NumPlazas = Int32.Parse(Console.ReadLine());
- if (bk1.ReservaValida)
- Console.WriteLine("El NIF " + bk1.Nif + " ha realizado una reserva de " + bk1.NumPlazas + " plazas");
- else
- {
- if (bk1.Nif == null)
- Console.WriteLine("El formato del NIF no es correcto");
- else
- Console.WriteLine("El número de plazas solicitado no está permitido");
- }
- Console.Read();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement