Wednesday, 22 March 2017

Hacker Rank Solution Program In C++ For " Day 0: Hello, World. "

Problem :- Day 0: Hello, World. 

Submit Your Solution Here :- Click Here

Copy The Color Code and paste it into hackerrank Editor .

Solution :-

#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;


int main() {
    // Declare a variable named 'input_string' to hold our input.
    string input_string; 
    
    // Read a full line of input from stdin (cin) and save it to our variable, input_string.
    getline(cin, input_string); 
    
    // Print a string literal saying "Hello, World." to stdout using cout.
    cout << "Hello, World." << endl;

    // TODO: Write a line of code here that prints the contents of input_string to stdout.
    cout<<input_string;
    return 0;
}

Output :-


Hacker Rank Solution Program In C++ For " Day 0: Hello, World. "

No comments:
Write comments

Recommended Posts × +