Java Program for Number Mirror | CodeChef Solution with Explanation

Java Program for Number Mirror | CodeChef Solution with Explanation

Java Program for Number Mirror | CodeChef Solution with Explanation
Java Program for Number Mirror - CodeChef

Problem

Write a program that takes a number N as the input, and prints it to the output.

Input Format

The only line contains a single integer.

Output Format

Output the answer in a single line.

Constraints

  • 0 <= N <= 105

Solution :

/* package codechef; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Codechef
{
	public static void main (String[] args) throws java.lang.Exception
	{
	    int a;
	    Scanner sc = new Scanner(System.in);
	    a = sc.nextInt();
	    System.out.println(a);
	}
}
  1. JavaScript: The Definitive Guide: Master the World's Most-Used Programming Language, 7th Edition (Greyscale Indian Edition).
  2. Eloquent JavaScript: A Modern Introduction to Programming.
  3. You Don`t Know JS: 6 Volume Set (Greyscale Indian Edition).
  4. Learning JavaScript Design Patterns: A JavaScript and React Developer's Guide, Second Edition (Grayscale Indian Edition).

🤑 Partner Discounts

  1. Educative.io: 20% off From Me, Plus 50% PROMO SALE.

Disclosure: This post may contain affiliate links, meaning I get a commission if you decide to make a purchase through my links, at no cost to you.