Skip to content

25 Languages Basic Hello World TN34DeVs


1.C - 1972
#include<stdio.h>
#include<stdbool.h>
int main()
{
int number1 = 13;
int number2 = 31;
char string1[] = "Welcome to TN34DeVs";
bool isAvailable = true;

printf("\n%s",string1);
printf("\nNumber 1: %d,Number 2: %d",number1,number2);
printf("\nTotal of Numbers 1 and 2 = %d",number1+number2);
printf("\nThe Boolean Value: %d",isAvailable);
return 0;
}
2.C++ - 1985
#include <iostream>

using namespace std;

int main()
{
int number1 = 13;
int number2 = 31;
char string1[] = "Welcome to TN34DeVs";
bool isAvailable = true;
cout<<string1<<endl;
cout<<"Number 1: "<<number1<<",Number 2: "<<number2<<endl;
cout<<"Total of Numbers 1 and 2 = "<<number1+number2<<endl;
cout<<"The Boolean Value: "<<isAvailable;
return 0;
}
- 1995
Java 1.8
public class HelloWorld{

public static void main(String []args){
int number1 = 13;
int number2 = 31;
String string1 = "Welcome to TN34DeVs";
Boolean isAvailable = true;

System.out.println(string1);
System.out.println("Number 1: "+number1+"Number 2: "+number2);
System.out.println("Total of Numbers 1 and 2 = "+(number1+number2));
System.out.println("The Boolean Value: "+isAvailable);
}
}
Java 10+
class HelloWorld{

public static void main(String []args){
var number1 = 13;
var number2 = 31;
var string1 = "Welcome to TN34DeVs";
var isAvailable = true;

System.out.println(string1);
System.out.println("Number 1: "+number1+"Number 2: "+number2);
System.out.println("Total of Numbers 1 and 2 = "+(number1+number2));
System.out.println("The Boolean Value: "+isAvailable);
}
}
4.Python3 - 1991
Approach 1
number1 = 13
number2 = 31
string1 = "Welcome to TN34DeVs"
isAvailable = True

print(string1)
print("Number 1: ",number1,"Number 2: ",number2)
print("Total of Numbers 1 and 2 = ",(number1+number2))
print("The Boolean Value: ",isAvailable)
Approach 2
number1 = 13
number2 = 31
string1 = "Welcome to TN34DeVs"
isAvailable = True

print(string1)
print("Number 1: {0}, Number 2: {1}".format(number1,number2))
print(f"Total of Numbers 1 and 2 = {(number1+number2)}")
print(f"The Boolean Value: {isAvailable}")

5.JavaScript / Node.js - 1995/2009
Approach 1
number1 = 13
number2 = 31
string1 = "Welcome to TN34DeVs"
isAvailable = true

console.log(string1);
console.log("Number 1: "+number1+"Number 2: "+number2);
console.log("Total of Numbers 1 and 2 = "+(number1+number2));
console.log("The Boolean Value: "+isAvailable);
Approach 2
number1 = 13
number2 = 31
string1 = "Welcome to TN34DeVs"
isAvailable = true

console.log(string1);
console.log(`Number 1: ${number1} Number 2: ${number2}`);
console.log(`Total of Numbers 1 and 2 = ${(number1+number2)}`);
console.log(`The Boolean Value: ${isAvailable}`);
6.Go - 2009
Approach 1
package main
import "fmt"

func main() {
var number1 int = 13
var number2 int = 31
var string1 string = "Welcome to TN34DeVs"
var isAvailable bool = true

fmt.Printf("\n%s",string1)
fmt.Printf("\nNumber 1: %d,Number 2: %d",number1,number2)
fmt.Printf("\nTotal of Numbers 1 and 2 = %d",number1+number2)
fmt.Printf("\nThe Boolean Value: %v",isAvailable)
}
Approach 2
package main
import "fmt"

func main() {
number1 := 13
number2 := 31
string1 := "Welcome to TN34DeVs"
isAvailable := true

fmt.Println(string1)
fmt.Println("Number 1:",number1,"Number 2:",number2)
fmt.Println("Total of Numbers 1 and 2 =",number1+number2)
fmt.Println("The Boolean Value:",isAvailable)
}
7.TypeScript - 2012
Approach 1
var
number1 =
13
var
number2 =
31
var
string1 =
"Welcome to TN34DeVs"
var
isAvailable =
true

console.log(string1);
console.log(
`Number 1:
${number1}
Number 2:
${number2}
`
);
console.log(
`Total of Numbers 1 and 2 =
${(number1+number2)}
`
);
console.log(
`The Boolean Value:
${isAvailable}
`
);
Approach 2
var
number1:
number
=
13
var
number2:
number
=
31
var
string1:
String
=
"Welcome to TN34DeVs"
var
isAvailable:
boolean
=
true

console.log(string1);
console.log(
`Number 1:
${number1}
Number 2:
${number2}
`
);
console.log(
`Total of Numbers 1 and 2 =
${(number1+number2)}
`
);
console.log(
`The Boolean Value:
${isAvailable}
`
);

8.Rust - 2010
fn main() {
let number1 = 13;
let number2:i32 = 31;
let string1:&str = "Welcome to TN34DeVs";
let is_available:bool = true;
println!("{}",string1);
println!("Number 1: {} Number 2: {}",number1,number2);
println!("Total of Numbers 1 and 2 = {}",(number1+number2));
println!("The Boolean Value: {}",is_available);
}
9.Ruby - 1995
number1 = 13
number2 = 31
string1 = "Welcome to TN34DeVs"
isAvailable = true

print(string1)
print("\nNumber 1: ",number1,"Number 2: ",number2)
print("\nTotal of Numbers 1 and 2 = ",(number1+number2))
print("\nThe Boolean Value: ",isAvailable)
10.Perl - 1988
$number1 = 13;
$number2 = 31;
$string1 = "Welcome to TN34DeVs";
$isAvailable = 1;

print $string1;
print("\nNumber 1: ",$number1," Number 2: $number2");
print("\nTotal of Numbers 1 and 2 = ",($number1+$number2));
print("\nThe Boolean Value: ",($isAvailable)?true:false);
11.PHP - 1995
<?php
$number1 = 13;
$number2 = 31;
$string1 = "Welcome to TN34DeVs";
$isAvailable = 1;

echo $string1;
echo "\nNumber 1: ",$number1," Number 2: $number2";
echo "\nTotal of Numbers 1 and 2 = ",($number1+$number2);
echo "\nThe Boolean Value: ",($isAvailable)?true:false;
?>
12.Kotlin - 2011
fun main(args: Array<String>) {
var number1 = 13;
var number2 = 31;
var string1 = "Welcome to TN34DeVs";
var isAvailable = true;

println(string1);
println("Number 1: "+number1+"Number 2: "+number2);
println("Total of Numbers 1 and 2 = "+(number1+number2));
println("The Boolean Value: "+isAvailable);
}
13.C# - 2000
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;

namespace HelloWorld
{
public class Program
{
public static void Main(string[] args)
{
int number1 = 13;
int number2 = 31;
string string1 = "Welcome to TN34DeVs";
bool isAvailable = true;
Console.WriteLine(string1);
Console.WriteLine("Number 1: "+number1+" Number 2: "+number2);
Console.WriteLine("Total of Numbers 1 and 2 = "+(number1+number2));
Console.WriteLine("The Boolean Value: "+isAvailable);
}
}
}
14.Swift - 2014
var number1 = 13
var number2:Int = 31
var string1 = "Welcome to TN34DeVs"
var isAvailable:Bool = true

print(string1)
print("Number 1: \(number1) Number 2: \(number2)")
print("Total of Numbers 1 and 2 = ",(number1+number2))
print("The Boolean Value: ",isAvailable)
15.Dart - 2011
void main() {
num number1 = 13;
num number2 = 31;
String string1 = "Welcome to TN34DeVs";
bool isAvailable = true;

print(string1);
print("Number 1: "+number1.toString()+"Number 2: "+number2.toString());
print("Total of Numbers 1 and 2 = "+(number1+number2).toString());
print("The Boolean Value: "+isAvailable.toString());
}
16.R - 1993
number1 = 13
number2 = 31
string1 = "Welcome to TN34DeVs"
isAvailable = TRUE

print(string1)
print(paste("Number 1: ",number1,"Number 2: ",number2))
print(paste("Total of Numbers 1 and 2 = ",(number1+number2)))
print(paste("The Boolean Value: ",isAvailable))
17.Scala - 2004
object HelloWorld {
def main(args: Array[String]) {
var number1 = 13;
var number2 = 31;
var string1 = "Welcome to TN34DeVs";
var isAvailable = true;

println(string1);
println("Number 1: "+number1+"Number 2: "+number2);
println("Total of Numbers 1 and 2 = "+(number1+number2));
println("The Boolean Value: "+isAvailable);
}
}
18.Haskell - 1990
main = do
let number1 = 13
let number2 = 31
let string1 = "Welcome to TN34DeVs"
let isAvailable = True;
print(string1)
putStrLn ("Number 1: "++show number1++"Number 2: "++show number2)
putStrLn ("Total of Numbers 1 and 2 = "++show (number1+number2))
putStrLn ("The Boolean Value: "++show isAvailable)
19.Julia - 2012
number1 = 13
number2 = 31
string1 = "Welcome to TN34DeVs"
isAvailable = true

println(string1)
println("Number 1: ",number1,"Number 2: ",number2)
println("Total of Numbers 1 and 2 = ",(number1+number2))
println("The Boolean Value: ",isAvailable)
20.Lisp - 1958
(setq number1 13)
(setq number2 31)
(setq string1 "Welcome to TN34DeVs")
(setq isAvailable T)

(write-line string1)
(format t "Number 1 = ~2d Number 2 = ~2d ~%" number1 number2)
(format t "Total of Numbers 1 and 2 = ~2d ~%" (+ number1 number2))
(princ "The Boolean Value: " )
(princ isAvailable)
21.Lua - 1993
number1 = 13
number2 = 31
string1 = "Welcome to TN34DeVs"
isAvailable = true

print(string1)
print("Number 1: ",number1,"Number 2: ",number2)
print("Total of Numbers 1 and 2 = ",(number1+number2))
print("The Boolean Value: ",isAvailable)
22.Fortran - 1957
program hello
integer:: number1 = 13
integer:: number2 = 31
character(len=19):: string1 = "Welcome to TN34DeVs"
logical :: isAvailable =.TRUE.
print *, string1
print *, "Number 1: ", number1, "Number 2: ", number2
print *, "Total of Numbers 1 and 2 = ",(number1+number2)
print *, "The Boolean Value: ",isAvailable
end program hello
23.Pascal - 1970
program Hello;
var
number1: integer = 13;
number2: integer = 31;
string1: string = 'Welcome to TN34DeVs';
isAvailable: boolean = true;
begin
writeln (string1);
writeln ('Number 1: ',number1,' Number 2: ',number2);
writeln ('Total of Numbers 1 and 2 = ',(number1+number2));
writeln ('The Boolean Value: ',isAvailable);
end.
24.ADA - 1980
with Ada.Text_IO; use Ada.Text_IO;
procedure Hello is
number1 : Integer := 13;
number2 : Integer := 31;
string1 : String := "Welcome to TN34DeVs";
isAvailable : Boolean := true;
total : Integer;
begin
Put_Line(string1);
total := number1+number2;
Put_Line("Number 1:"& number1'Image &" Number 2:"& number2'Image);
Put_Line("Total of Numbers 1 and 2 = " &total'Image);
Put("The Boolean Value: "&isAvailable'Image);
end Hello;
25.NIM - 2008
import strformat

var number1 = 13
let number2 = 31
let string1 = "Welcome to TN34DeVs"
let isAvailable = true

echo(string1)
echo(fmt"Number 1: {number1} Number 2: {number2}")
echo("Total of Numbers 1 and 2 = ",(number1+number2))
echo("The Boolean Value: ",isAvailable)

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.