<html><div style='background-color:'><P>/*Menu con funciones del Area y Perimetro del Rectangulo */<BR>#include<stdio.h><BR>#include<conio.h><BR>float Per(float x1,float x2);<BR>float Area(float x1,float x2);<BR>void main()<BR>{<BR>clrscr();<BR>int op=0;<BR>float b=0,h=0,R1=0,R2=0;</P>
<P><BR>printf("\n *** MENU *** \n");<BR>printf("\t1 Area del Triangulo \n");<BR>printf("\t2 Perimetro del Triangulo \n");<BR>printf("\t3 SALIR ");<BR>printf("Ingrese la opcion");<BR>scanf("%d",&op);<BR>do<BR>{scanf("%d",&op);<BR>}while(op<1 || op>3);<BR>clrscr();</P>
<P>switch(op)<BR>{<BR>case 1: clrscr();<BR>  printf("\n Area del Rectangulo");<BR>  printf("\n Ingrese la Base: ");scanf("%f",&b);<BR>    do<BR>    {scanf("%f",&b);<BR>    }while(b<=0);<BR>  printf("\n Ingrese la Altura: ");scanf("%f",&h);<BR>    do<BR>    {scanf("%f",&h);<BR>    }while(h<=0);<BR>    R1=Area(b,h);<BR>  printf("\n El Area del Triangulo es: %.2f",R1);<BR>  break;<BR>case 2: clrscr();<BR>  printf("\n Perimetro del Rectangulo");<BR>  printf("\n Ingrese la Base: ");scanf("%f",&b);<BR>    do<BR>    {scanf("%f",&b);<BR>    }while(b<=0);<BR>  printf("\n Ingrese la Altura: ");scanf("%f",&h);<BR>    
do<BR>    {scanf("%f",&h);<BR>    }while(h<=0);<BR>    R2=Per(b,h);<BR>  printf("\n El Perimetro del Triangulo es: %.2f",R2);<BR>  break;<BR>    default: printf("\n entre 1 y 3");<BR>getch();<BR>}<BR>float Area(float x1,float x2)<BR>{<BR>float c=0;<BR>c=x1+x1+x2+x2;<BR>return c;<BR>}<BR>float Per(float x1,float x2)<BR>{<BR>float c=0;<BR>c=x1*x2;<BR>return c;<BR>}</P>
<P> <BR><FONT face="Lucida Handwriting, Cursive" size=4><FONT face="Geneva, Arial, Sans-serif">G</FONT><FONT face=Wingdings>b</FONT><FONT face="Geneva, Arial, Sans-serif">BRIEL G<FONT face=Wingdings>b</FONT>LE<FONT face=Wingdings>b</FONT>S</FONT></FONT></P>
<DIV>
<P><FONT face="Times New Roman, Times, Serif" size=3>Técnico en computación.</FONT></P>
<P><FONT face=Arial size=2>Mantenimiento preventivo y correctivo de Pc´s</FONT></P></DIV></div><br clear=all><hr>Encuentra una aventura, un romance o al amor de tu vida.  <a href="http://g.msn.com/8HMBESES/2737??PS=47575" target="_top">Date de alta gratis.</a> </html>