HR30 Day 0: Hello, World.

1 개요[ | ]

Day 0: Hello, World.
해커랭크 30 Days of Code
문제 풀이
0-9 Day e
HR30 Day 0: Hello, World.

HR30 Day 1: Data Types

HR30 Day 2: Operators

HR30 Day 3: Intro to Conditional Statements

HR30 Day 4: Class vs. Instance

HR30 Day 5: Loops

HR30 Day 6: Let's Review

HR30 Day 7: Arrays

HR30 Day 8: Dictionaries and Maps

HR30 Day 9: Recursion

2 같이 보기[ | ]

3 C[ | ]

#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
int main() {
    char input_string[105]; 
    scanf("%[^\n]", input_string); 
    printf("Hello, World.\n");
    printf("%s\n", input_string);
    return 0;
}

4 C++[ | ]

#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
    string input_string; 
    getline(cin, input_string); 
    cout << "Hello, World." << endl;
    cout << input_string << endl;
    return 0;
}

5 C#[ | ]

class Solution {
    static void Main(String[] args) {
        String inputString; 
        inputString = Console.ReadLine(); 
        Console.WriteLine("Hello, World.");
        Console.WriteLine(inputString);
    }
}

6 Go[ | ]

package main
import (
    "fmt"
    "os"
    "bufio"
)
func main() {
    reader := bufio.NewReader(os.Stdin)
    input_string, _ := reader.ReadString('\n')
    fmt.Println("Hello, World.") 
    fmt.Println(input_string) 
}

7 Java[ | ]

import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
public class Solution {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in); 
		String inputString = scan.nextLine(); 
		scan.close(); 
        System.out.println("Hello, World.");
        System.out.println( inputString );
	}
}

8 node.js[ | ]

function processData(inputString) {
    console.log("Hello, World.");
    console.log(inputString);
}
process.stdin.resume();
process.stdin.setEncoding("ascii");
_input = "";
process.stdin.on("data", function (input) {
    _input += input;
});

process.stdin.on("end", function () {
   processData(_input);
});

9 Perl[ | ]

my $inputString = <STDIN>;
print "Hello, World.\n";
print $inputString;

10 PHP[ | ]

<?php
$_fp = fopen("php://stdin", "r");
$input_string = fgets($_fp);
print("Hello, World.\n");
echo $input_string;
fclose($_fp);

11 Python[ | ]

input_string = input()
print('Hello, World.')
print(input_string)

12 Ruby[ | ]

input_string = gets
puts 'Hello, World.'
puts input_string
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}