Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- with Ada.Text_IO;
- use Ada.Text_IO;
- procedure ejercicio_3 is
- -- Definimos los tipos de datos del enunciado
- type A is delta 0.001 range -10.00..150.00;
- type B is digits 4 range -100.00..100.00;
- -- Inicializamos variables
- aux1:A:=-1.999;
- aux2:B:=30.5432;
- total:Float;
- begin
- -- Calculamos la operación A + B
- total:=Float(aux1)+Float(aux2);
- -- Imprimimos el resultado por pantalla
- Put_Line(total'Img);
- end ejercicio_3;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement