Guest User

Untitled

a guest
May 26th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. if(n<=7)
  4. {
  5. octal=n;
  6. }
  7.  
  8. else
  9. {
  10.  
  11. while(n>=8 )
  12. {
  13. a=n%8;
  14. n=n/8;
  15. }
  16. n=n%8;
  17.  
  18. }
  19.  
  20. printf("Informe um numero decimal:");
  21. scanf("%d",&n);
  22.  
  23. octal=decim(n);
  24.  
  25. printf(" o numero octal eh: %dn",octal);
  26.  
  27.  
  28.  
  29. return 0;
Add Comment
Please, Sign In to add comment