Solutions
HackerEarth
HackerEarth
  • Home
  • 👨🏻‍💻 Profile
  • Practice
    • Basic Programming
      • Input/Output
        • Easy
    • Data Structure
      • Linked List
    • Algorithms
      • Searching
        • Linear Search
        • Binary Search
      • Greedy Algorithms
Powered by GitBook
On this page

Was this helpful?

  1. Practice
  2. Basic Programming

Input/Output

Read from STDIN, Write to STDOUT

using System;

public class Program {
    public static void Main() {
        int N = int.Parse(Console.ReadLine()); //Reading input from STDIN
        Console.WriteLine(N * 2); // Writing output to STDOUT
        string S = Console.ReadLine();
        Console.WriteLine(S);
    }
}
PreviousBasic ProgrammingNextEasy

Last updated 2 years ago

Was this helpful?