Exemplo de menu em linguagem c#

2586 palavras 11 páginas
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main()
{

int opcao;

begin:

opcao=0;

system ("CLS"); printf ("\xC9\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xBB\n"); printf ("\xBA \tMENU DE OPCOES \xBA\n"); printf ("\xC8\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xBc\n\n"); printf ("\xC9\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xBB\n"); printf ("\xBA 1- EXERCICIO I \xBA\n"); printf ("\xBA 2- EXERCICIO II \xBA\n"); printf ("\xBA 3- EXERCICIO III \xBA\n"); printf ("\xBA 4- EXERCICIO IV \xBA\n"); printf ("\xBA 5- EXERCICIO V \xBA\n"); printf ("\xBA 6- EXERCICIO VI \xBA\n"); printf ("\xBA 7- EXERCICIO VII \xBA\n"); printf ("\xBA 8- EXERCICIO VIII\xBA\n"); printf ("\xBA 9- EXERCICIO IX \xBA\n"); printf ("\xBA 10- EXERCICIO X \xBA\n"); printf ("\xBA 11- SAIR \xBA\n"); printf ("\xC8\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xBC\n\n"); printf ("Digite a opcao seleccionada: "); scanf ("%d",&opcao);

if (opcao >= 12 || opcao <= 0){ printf ("\t\n\nERRO DIGITE UMA OPCAO VALIDA! <Para voltar tecle ENTER>\n\n"); getch (); fflush(stdin); goto begin;}

switch (opcao) { case 1: { system ("cls"); printf ("\tEXERCICIO I\n"); printf ("\t\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\n\n"); printf ("Construa um programa que calcule a area de um triangulo.\n"); printf ("Lembre-se de que, para realizar esse calculo, e necessario utilizar a formula:\n"); printf ("\n\nArea = (base * altura /2).\n"); printf ("\n\n\nDigite uma tecla para

Relacionados

  • Unidade ii - introdução sobre linguagens de programação
    1529 palavras | 7 páginas
  • 02 26 Turbo C Mat Ria
    738 palavras | 3 páginas
  • Modelos de interação
    3923 palavras | 16 páginas
  • Algorítmos
    3226 palavras | 13 páginas
  • normas
    1981 palavras | 8 páginas
  • Livro c#
    25045 palavras | 101 páginas
  • Controladores logicos
    27896 palavras | 112 páginas
  • Programa c++ matrizes
    2476 palavras | 10 páginas
  • PROGRAMA O COMERCIAL
    11496 palavras | 46 páginas
  • Pyton
    3683 palavras | 15 páginas