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;
- namespace ConsoleApplication1
- {
- class Program
- {
- /*---------------------------------------------------
- Métodos do programa
- ---------------------------------------------------*/
- //Método de fornecimento de numeros
- int[] Fornecimento(int[] numero)
- {
- int opcao;
- //apresentação do tipo de opcao
- Console.Clear();
- Console.Write("*****************************************************************");
- Console.Write("n*tttttttt*");
- Console.Write("n*ttFORNECIMENTO DE NUMEROStttt*");
- Console.Write("n*tttttttt*");
- Console.Write("n*****************************************************************");
- Console.Write("nntO que deseja fazer: nnt=>1-Fornecer os numeros nt=>2-Gerar numeros automaticamente nntEscolha uma opcao: ");
- opcao = Convert.ToInt32(Console.ReadLine());
- if (opcao == 1)
- {
- }
- return (numero);
- }
- /*---------------------------------------------------
- Método principal do programa
- ---------------------------------------------------*/
- static void Main(string[] args)
- {
- //declaração de variáveis
- int[] numero = new int[500000];
- int retorno = 1, tipo = 0;
- while (retorno == 1)
- {
- //comando limpa a tela
- Console.Clear();
- //apresentação do programa
- Console.Write("*****************************************************************");
- Console.Write("n*tttttttt*");
- Console.Write("n*tttALGORITMO DE ORDENACAOttt*");
- Console.Write("n*tttttttt*");
- Console.Write("n*****************************************************************");
- //menu de escolha do tipo de algoritmo de ordenação(loop repete até que um tipo válido seja inserido)
- while ((tipo != 1) && (tipo != 2) && (tipo != 3))
- {
- Console.Write("nntQue tipo de algoritmo deseja utilizar: nnt1-Inserction sort nt2-Selection sort nt3-Bubble sort nntEscolha uma opção=> ");
- tipo = Convert.ToInt32(Console.ReadLine());
- }
- numero = Fornecimento(numero);
- }
- retorno++;
- //Environment.Exit(exitCode);
- Console.ReadKey();
- }
- }
- }
Add Comment
Please, Sign In to add comment