27/05/2009, 14:42
|
| | | Fecha de Ingreso: octubre-2008
Mensajes: 106
Antigüedad: 16 años, 3 meses Puntos: 1 | |
Ayuda con DEV C++ y los switch!!! hice este sencillo programa pero al correrlo cuando tecleo una numero y le doy enter
sale que el programa no respode y c cierra, ayuda por favor:
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
int main(){
int resp;
printf("\t\tpresione: 1->si ; 2 ->no ; 3 ->nose\n\n\n\t\tSu respuesta es:");
scanf("%d",resp);
switch(resp){
case '1':
printf(" usted ha dicho SI");
break;
case '2':
printf(" usted ha dicho NO");
break;
case '3':
printf(" usted ha dicho NO SE");
default:
printf("%d Esa opcion no es valida");
}
printf("\n");
getch();
} |