iskren_penev

Base7ToDecimal

Mar 18th, 2016
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.35 KB | None | 0 0
  1. package softuni.homework.problem6;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class Base7ToDecimal {
  6.     public static void main(String[] args) {
  7.         Scanner input = new Scanner(System.in);
  8.  
  9.         String base7Number = input.nextLine();
  10.         int decimalNumber = Integer.valueOf(base7Number, 7);
  11.         System.out.println(decimalNumber);
  12.     }
  13. }
Add Comment
Please, Sign In to add comment