0
decimal to octal converter
someone could help me using C program,
3 Answers
0
If you only need to print a number in octal base you can use printf function.
http://www.cplusplus.com/reference/cstdio/printf/
#include <stdio.h>
int main() {
int i;
printf("Enter an integer: ");
scanf("%d", &i);
printf("%d\nDecimal -> %d | Octal -> %o", i, i, i);
return 0;
}
Code updated Robin J. Sestoso
Hth, cmiiw
+ 1
thanks but we need to include scanf(" %d", & varisble)
+ 1
thank you..
Hot today
I have made a calculator in which my % (Percentage) not work correctly for 100%50 or 100%20.
0 Votes
Тренажер кода
0 Votes
Python palindrome challenge.
1 Votes
Java
0 Votes