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 ConsoleApplication1
- {
- public class Opcoes
- {
- int opescolhida, isPref, qtdSenhaNormal, queuePosition, qtdSenhaPreferencial;
- string nome, conta;
- int[] fila = new int[15] { 1, 2, 3, 4, 5,6,7,8,9,10,11,12,13,14,15};
- string[] clientesNaFila = new string[15];
- public void chamarmenuprincipal()
- {
- while (opescolhida !=5)
- {
- Console.WriteLine("Senhas Normais: " + qtdSenhaNormal + ".\n Senhas Preferenciais: " + qtdSenhaPreferencial + "\n");
- for (fila[i] == fila[1]; fila 15; sclientesNaFila++) {
- Console.WriteLine("Posição: " + fila + ". " + clientesNafila + "\n");
- }
- Console.Write("\nDigite o número correspondente para opção desejada!\n");
- Console.WriteLine("\n1 - Cadastrar Cliente");
- Console.WriteLine("2 - Gerar Senha ");
- Console.WriteLine("3 - Gerar Senha Preferencial");
- Console.WriteLine("4 - Alterar Cadastro de Cliente");
- Console.WriteLine("5 - Sair do Sistema\n");
- opescolhida = int.Parse(Console.ReadLine());
- switch (opescolhida)
- {
- //SE 1: realizar cadastro--------------------------------------------pronto
- case 1:
- Console.WriteLine("\nDigite o Nome do Cliente\n");
- nome = Console.ReadLine();
- Console.WriteLine("\nDigite a Conta do cliente\n");
- conta = Console.ReadLine();
- Console.WriteLine("\nDigite 0 para senha normal, ou 1 para senha preferencial\n");
- isPref = int.Parse(Console.ReadLine());
- if (isPref == 1)
- {
- qtdSenhaPreferencial = qtdSenhaPreferencial + 1;
- }else if (isPref == 0)
- {
- qtdSenhaNormal = qtdSenhaNormal + 1;
- }else
- {
- Console.WriteLine("Error Machine");
- Console.Clear();
- chamarmenuprincipal();
- }
- Console.Clear();
- break;
- //SE 2: gerar a senha------------------------------
- case 2:
- qtdSenhaNormal = qtdSenhaNormal + 1;
- Console.Clear();
- break;
- //SE 3: gerar senha preferencial-------------------
- case 3:
- qtdSenhaPreferencial = qtdSenhaPreferencial + 1;
- Console.Clear();
- break;
- //SE 4: alterar cadastro----------------------------pronto
- case 4:
- Console.WriteLine("\nDigite o Nome atualizado do Cliente\n");
- nome = Console.ReadLine();
- Console.WriteLine("\nDigite a Conta atualizada do Cliente\n");
- conta = Console.ReadLine();
- break;
- //SE 5:visualizar a variavel nome e conta----------------------------pronto
- case 5:
- Environment.Exit(0);
- break;
- //SE 6:fechar a janela-----------------------------------------------pronto
- case 6:
- //SE DIGITAR ERRADO:-------------------------------------------------pronto
- default:
- Console.Write("\nOpção inválida. Aperte qualquer tecla para sair...\n");
- Console.ReadKey();
- break;
- }//------------------------------------------------------------------------------------------------------------
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement