#include #include void suma(void); void menu(void); void resta(void); void multi(void); void margen(void); main(){ menu(); return(0); } void resta(void){ int a,b,r; margen(); gotoxy(32,3);printf("RESTA DE DOS NUMEROS"); gotoxy(5,6);printf("Dame un n—mero:");scanf("%d",&a); gotoxy(5,8);printf("Dame otro n—mero:");scanf("%d",&b); r=a-b; gotoxy(25,12);printf("Resta = %d",r); getch(); } void multi(void){ int a,b,r; margen(); gotoxy(32,3);printf("MULTIPLICACION DE DOS NUMEROS"); gotoxy(5,6);printf("Dame un n—mero:");scanf("%d",&a); gotoxy(5,8);printf("Dame otro n—mero:");scanf("%d",&b); r=a*b; gotoxy(25,12);printf("Multiplicaci¢n = %d",r); getch(); } void menu(void){ int op; do{ margen(); gotoxy(30,3);printf("MENU"); gotoxy(26,5);printf("1.- Suma de dos n£meros"); gotoxy(26,6);printf("2.- Multiplicaci¢n de dos n£meros"); gotoxy(26,7);printf("3.- Resta de dos n£meros"); gotoxy(26,8);printf("4.- Salir"); gotoxy(35,10);printf("Selecciona Opci¢n:");scanf("%d",&op); if(op==1){ suma(); } if(op==2){ multi(); } if(op==3){ resta(); } }while(op!=4); } void margen(void){ int x; clrscr(); for(x=1;x<=80;x++){ gotoxy(x,1);printf("Û"); gotoxy(x,24);printf("Û"); } for(x=1;x<=24;x++){ gotoxy(1,x);printf("Û"); gotoxy(80,x);printf("Û"); } } void suma(void){ int a,b,r; margen(); gotoxy(32,3);printf("SUMA DE DOS NUMEROS"); gotoxy(5,6);printf("Dame un n—mero:");scanf("%d",&a); gotoxy(5,8);printf("Dame otro n—mero:");scanf("%d",&b); r=a+b; gotoxy(25,12);printf("Suma = %d",r); getch(); }