Program menu if

235 views

Published on

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
235
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Program menu if

  1. 1. ____________________________________________________________________________________________________________________program MenuIf;uses crt;varx,d:integer;op:char;a,b,c,y,m:real;Beginclrscr;textcolor(2);gotoxy (10,2);write(MENU PRINCIPAL);gotoxy (6,4);write(1.Sumar Tres Numeros.);gotoxy (6,5);write(2.Raiz Cuadrada.);gotoxy (6,6);write(3.Valor Absoluto.);gotoxy (6,7);write(4.Ordenar dos numeros.);gotoxy (6,8);write(5.Salir.);gotoxy (6,10);write(Por favor digite su opcion: );read(x);clrscr;if x=1 thenbegingotoxy (3,2);write(Digite el primer numero que desee: );readln(a);gotoxy (3,3);write(Digite el segundo numero que desee: );
  2. 2. readln(b);gotoxy (3,4);write(Digite el tercer numero que desee: );readln(c);gotoxy (3,6);textcolor(2);write(La suma de los tres numeros ingresados es: ,a+b+c:0:1);end;if x=2 thenbegingotoxy (3,2);write(Digite el numero que desee: );readln(d);m:=sqrt(d);gotoxy (3,4);textcolor(2);write (La raiz cuadrada del numero ingresado es: ,m:0:1);end;if x=3 thenbegingotoxy (3,2);write(Digite el numero que desee: );readln(y);m:=abs(y);gotoxy (3,4);textcolor(2);write (El valor absoluto del numero ingresado es: ,m:0:0);end;if x=4 thenbegingotoxy (3,2);write(Digite el primer numero que desee: );readln(a);gotoxy (3,3);write(Digite el segundo numero que desee: );
  3. 3. readln(b);if a>b thenbegingotoxy (3,5);textcolor(2);write(El numero mayor es: ,a:0:1, y el menor es: ,b:0:1);end;if b>a thenbegingotoxy (3,5);textcolor(2);write(El numero mayor es: ,b:0:1, y el menor es: ,a:0:1);end;end;if x=5 thenbegingotoxy (3,2);textcolor(2);writeln(Por favor presione una tecla para finalizar. Gracias...);end;Readkey;end.____________________________________________________________________________________________________________________

×