URI online judge 1000 solution: Hello World! program in C C++

URI online judge 1000 solution: Hello World! program in C C++

Hello World program in C

According to URI Online judge, the problem 1000 to print "Hello World!" in C is given below:

Your first program in any programming language is usually "Hello World!". In this first problem, all you have to do is print this message on the screen.

Input

This problem has no input.

Output

You must print the message "Hello World!" as shown below.

Input SampleOutput Sample
Hello World!

First Method:

Program:

#include<stdio.h>
int main()
{
    printf("Hello World!");

    return 0;
}

Output:

Hello World!
Process returned 0 (0x0) execution time :
Press any key to continue.

Keep reading:

Second Method:

If you don't want the sentence "Process to continue.", then try the second method.

Program:

#include<stdio.h>
int main()
{
    printf("Hello World!");

    getch();
}

Output:

Hello World!

Third Method:

If you want to add a comment to your program, then try this:

Program:

//Write a C program that Prints Hello World!

#include<stdio.h>
int main()
{
    printf("Hello World!");

    getch();
}

Output:

Hello World!

Hello World program in C++

Write a program in C++ that prints Hello World!.

Program

// Hello World Program in C++ Language

#include <iostream>


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

To run this code on your Laptop or PC, download Code::blocks, and to run in your android mobile download CppDroid - C/C++ IDE from play store or you can simply search on google Online C Compiler or Online C++ Compiler, you'll get plenty of online compilers! Try them!


Browse More Posts from Programming