001-006-013

Long to Int

Easy

Problem Description

Long to Int

In this problem, you will create a program that casts a long value to an int type and displays the result to standard output.

Learning Objective: Understand the basics of long to int

Overview

Store a value in a long variable, convert it to an int type using an (int) cast, and display the result.

Output Format

Int: 1000000

Test Cases

※ Output examples follow programming industry standards

Normal case
Input:
Expected Output:
Int: 1000000
Boundary case
Input:
Expected Output:
Int: 1000000

Your Solution

Current Mode: My Code
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 10 free executions remaining