Created
March 11, 2016 09:12
-
-
Save volosgoto/8403a60fc210825ad10e to your computer and use it in GitHub Desktop.
Lesson_03_Task 2 (DifferentRadixSummator)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Lesson_03; | |
import java.util.*; | |
public class DifferentRadixSummator { | |
public static void main(String[] args) { | |
Scanner myScan = new Scanner(System.in); | |
System.out.print("Enter X in Bin: "); | |
int x = myScan.nextInt(2); | |
System.out.print("Enter Y in Oct: "); | |
int y = myScan.nextInt(8); | |
System.out.print("Enter Z in Hex: "); | |
int z = myScan.nextInt(16); | |
int result = x + y + z; | |
System.out.println(result); | |
myScan.close(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment