Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PROGRAM numeroctal;
- CONST
- base= 8;
- VAR
- entrada: integer;
- a , b , c: integer;
- decimal : integer;
- BEGIN
- Write('Ingrese un n£mero entero: ');
- readln(entrada);
- a:=entrada MOD 10;
- b:=(entrada DIV 10) MOD 10;
- c:=entrada DIV 100;
- decimal:= c*sqr(base) + b*base + a;
- writeln;
- writeln('Octal ',entrada,' = Decimal ',decimal);
- readln;
- END.
Advertisement
Add Comment
Please, Sign In to add comment