We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab1d7e4 commit 58b6211Copy full SHA for 58b6211
For loop/50. Decimal to octal.c
@@ -6,7 +6,7 @@ Enter a number to convert : 79
6
Expected Output :
7
The Octal of 79 is 117.
8
9
-1. Take input
++ 1. Take input
10
2. Figure out how to convert to octal
11
3. Invalid input
12
4. Convert
@@ -16,6 +16,17 @@ The Octal of 79 is 117.
16
8. Add and push
17
*/
18
19
+#include <stdio.h>
20
+
21
+int input_decimal_number();
22
23
int main() {
24
+ int decimal_number = input_decimal_number();
25
return 0;
26
}
27
28
+int input_decimal_number() {
29
+ int decimal_number;
30
+ scanf("%d", &decimal_number);
31
+ return decimal_number;
32
+}
0 commit comments