PC2.CPP

 


#include<stdio.h>
#include<stdlib.h>
#include<conio.h>
#include<dos.h>
#include<math.h>
#include<menu2.h>
#define sal 0x378
#define ent 0x379
#define M 200

/****************************** PROGRAMA PRINCIPAL PC2 ************************/

void main()
{
int op=0;
double rr, n[5];
outp(sal,0);
menu1("2");
do {
op=entra();
switch(op){
         case 49:  n[0]=entra();
                       n[1]=entra();
                       rr=sum(n[0],n[1]);
                       sale(rr);
                       break;
          case 50: n[0]=entra();
                        n[1]=entra();
                        rr=mu(n[0],n[1]);
                        sale(rr);
                        break;
          case 51:  n[0]=entra();
                        n[1]=entra();
                        n[2]=entra();
                        n[3]=entra();
                        rr=poten(n[0],n[1],n[2],n[3]);
                        sale(rr);
                        break;
           case 52:  n[0]=entra();
                         n[1]=entra();
                         rr=ex(n[0],n[1]);
                        sale(rr);
                        break;
           case 27:exit(1);
                 }
   }while(op!=27);
closegraph();
}

/**************************************************************************/