Table of contents
Decimal to Octal Conversion
[Problem description] For any input non-negative decimal integer n (0=<n<100000), print out its equivalent octal number [
Input form] Non-negative decimal integer
[Output form] The corresponding decimal integer converted to octal Positive integer, if the input does not meet the requirements, an error will be displayed, and re-enter
[Sample Input] 5548
[Sample Output] 12654
[Sample Description] First determine whether the input meets the requirements of non-negative positive integers
programming
C language
#include<stdio.h>
int main(){
int n,a[100],i=0;
scanf("%d",&n);
if(n==0){
printf("%d",0);
return 0;
}
while(n!=0){