Thursday, December 31, 2020

Say "Hello, World!" With C++ | Hackerrank | C++ | Solution



Problem : https://www.hackerrank.com/challenges/cpp-hello-world/problem

Solution : 


1 - #include <iostream>

#include <cstdio>
using namespace std;

int main() {
    printf("Hello, World!");
    return 0;
}




2 - #include <iostream>
#include <cstdio>
using namespace std;

int main() {
    char str[] = "Hello, World!";
    printf("%s",str);
    return 0;
}


3 - #include <iostream>
#include <cstdio>
using namespace std;

int main() {
    cout<<"Hello, World!";
    return 0;
}


No comments:

Post a Comment