Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- if(n<=7)
- {
- octal=n;
- }
- else
- {
- while(n>=8 )
- {
- a=n%8;
- n=n/8;
- }
- n=n%8;
- }
- printf("Informe um numero decimal:");
- scanf("%d",&n);
- octal=decim(n);
- printf(" o numero octal eh: %dn",octal);
- return 0;
Add Comment
Please, Sign In to add comment