013-002-004
Integer Class: String to Number Conversion
Easy
Problem Description
Integer Class: String to Number Conversion
Learning Objective: Convert string to number with Integer.parseInt
Create program converting numeric strings to integers for calculation. Convert string "123" to integer 123 with Integer.parseInt.
Input
Line 1: Numeric string 1 (String)
Line 2: Numeric string 2 (String)
Output
Sum: [sum]
Product: [product]
```java
## Examples
### Example 1: Basic values
Input:
```java
10
20
```java
Output:
```java
Sum: 30
Product: 200
```java
### Example 2: Different values
Input:
```java
5
8
```java
Output:
```java
Sum: 13
Product: 40
```java
### Example 3: Boundary values
Input:
```java
1
1
```java
Output:
```java
Sum: 2
Product: 1
Test Cases
※ Output examples follow programming industry standards
Input:
10 20
Expected Output:
Sum: 30 Product: 200
Input:
5 8
Expected Output:
Sum: 13 Product: 40
Input:
1 1
Expected Output:
Sum: 2 Product: 1
❌ Some tests failed
Your Solution
Current Mode:● My Code
99
1
2
3
4
5
6
7
8
9
10
›
⌄
⌄
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// Write your code here
sc.close();
}
}
0 B / 5 MB
You have 9 free executions remaining
