Skip to content

Commit 25cbd7c

Browse files
committed
convert octal to decimal
1 parent 04fafc4 commit 25cbd7c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

octal-to-decimal.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
class octaltodecimal
2+
{
3+
public static void main(String args[])
4+
{
5+
6+
String octalString="121";
7+
int decimal=Integer.parseInt(octalString,8);
8+
System.out.println(decimal);
9+
}
10+
}

0 commit comments

Comments
 (0)