Algorithm


Problem Link - https://www.codechef.com/problems/START01

Problem

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

Input Format

The only line of input contains a single integer.

Output Format

Output the answer in a single line.

Constraints

  • 0≤�≤105

Sample 1:

Input
 
Output
 
123
123

Explanation:

The input is 123. So the output is also 123.

Sample 2:

Input
 
Output
 
15
15

Explanation:

The input is 15. So the output is also 15.

Code Examples

#1 Code Example with C Programming

Code - C Programming

#include<stdio.h>
int main()
{
    int num;
    scanf("%d", &num);
    printf("%d\n", num);
}
Copy The Code & Try With Live Editor

Input

x
+
cmd
123

Output

x
+
cmd
123

#2 Code Example with Python Programming

Code - Python Programming

a = int(input())
print(a)
Copy The Code & Try With Live Editor

Input

x
+
cmd
15

Output

x
+
cmd
15

#3 Code Example with C++ Programming

Code - C++ Programming

#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
int main() {
    ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
    int t ;
    cin >> t;
    cout << t;
}
Copy The Code & Try With Live Editor

Input

x
+
cmd
125

Output

x
+
cmd
125

#4 Code Example with Java Programming

Code - Java Programming

import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		System.out.println(n);
		sc.close();
	}
}
Copy The Code & Try With Live Editor

Input

x
+
cmd
125

Output

x
+
cmd
125
Advertisements

Demonstration


CodeChef Solution - Number Mirror - START01,

For getting input data, use scanf() function

To print data use printf() function.

 

Next
CodeChef Solution - GDTURN-Good Turn