Write hello program using different programming languages

✏๐Ÿ“ƒMulti-Language Greetings: A Code Showcase in C, C++, Java, Python, and PHP ๐Ÿ‘‡



C Programming Language (C) ๐Ÿ‘‰

c
#include<stdio.h> int main() { printf("Hello C language"); return 0; }

Save this code as "hello.c". The extension ".c" signifies C programming. Note: "return 0" indicates successful execution, while "return 1" denotes unsuccessful execution.

Output of this program: Hello C language

C++ Programming Language (C++) ๐Ÿ‘‰

cpp
#include<iostream.h> #include<conio.h> int main() { cout << "Hello C++ language"; return 0; }

Save as "hello.cpp". The ".cpp" extension is for C++ programming.

Output: Hello C++ language

Java Programming Language (JAVA) ๐Ÿ‘‰

java
class main { public static void main(String args[]) { System.out.println("Hello JAVA"); } }

Save as "hello.java". The ".java" extension is for JAVA programming.

Output: Hello JAVA

Python Programming Language (Python) ๐Ÿ‘‰

python
# Let's write our first Python file, called "hello.py" print("Hello Python")

Save as "hello.py". The ".py" extension indicates Python programming.

Output: Hello Python

PHP Programming Language (PHP) ๐Ÿ‘‰

php
<!DOCTYPE> <html> <body> <?php echo "<h2>Hello PHP</h2>"; ?> </body> </html>

Save as "hello.php". The ".php" extension denotes PHP programming.

Output: Hello PHP

Comments

Post a Comment

Popular posts from this blog

๐ŸงŸ‍♂️ Zombie Shooting Galore: A Thrilling HTML, CSS, JS Game Tutorial! ๐ŸŽฎ๐Ÿš€

๐ŸŽ‰ Unleash the Fun: Spin Wheel Game Coding Extravaganza with HTML, CSS, JS! ๐Ÿš€✨

Navigating the Digital Renaissance: Embracing Tech Trends in 2024