Qual o erro nesse codigo fonte programado em C?

Comecei a aprender programação, comecei com a linguagem C, porem estou com um erro no meu codigo fonte, por favor estudem este projeto e me digam o que está de errado.

Uso o Compiler C++ 5.5; o erro que da nal linha 26 é o seguinte:

ERRO NA COMPILAÇÃO:

C:\Borland\bcc55\Bin>bcc32 -I -L apo.txt

Borland C++ 5.5 for Win32 Copyright <c> 1993, 2000 Borland

apo.txt:

Error E2155 apo.txt 26: Too many default cases in function main

*** 1 errors in Compile ***

CODIGO FONTE:

___________________________________________

#include <stdio.h>

#include <conio.h>

#include <math.h>

main (){ float x,y,m;

int op;

do { clrscr(); printf("\n\tDigite o numero de X e Y;");

printf("\n\tx: ");

scanf("%f",&x);

printf("\ty: ");

scanf("%f",&y);

printf("\n\n\tMaior Numero= %.2f\tMenor Mumero=%.2f", x>= y? x : y, x<=y? x:y);

printf("\n\n\tX: %.2f Y: %.2f\tSoma= %.2f\tMedia= %.2f", x, y,x+y,(x+y)/2);

printf("\n\n\tDeseja recome%car?\n\n", 135);

printf ("\n\n\tTecle 1 para recome%car e 0 para sair: ",135);

scanf("%f",&op);

switch (op) {

case 1: printf("\n\n\tVoce Apertou 1\n\tAperte uma tecla para continuar..."); break;

case 0: default: printf("\n\n\tVoce Apertou 0\n\tAperte uma tecla para continuar..."); break;

default: printf("\n\n\tDigite somente 1 pra Recome%car ou 0 para sair!!!",135); /*ERRO NESSA LINHA:26*/

printf("\n\tAperte uma tecla para continuar...");

}

getch();

} while (op !=1);

return 0; }

___________________________________________

Update:

Este 135 é o "ç", coloquei %c, depois o numero do ç que é 135, quando vc da alt + 135 sai ç, entendeu???

Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Helpful Social

Copyright © 2024 QUIZLS.COM - All rights reserved.