M

@MihaiPopa1

Code 2 - Hello, world! program, 5 times

C++
4 years ago
// Hello, world! program in pure C++, that prints 5 times #include <iostream> int main() { int a; for(a = 1; a < 6; ++a ) { std::cout << "Hello, world!\n"; /* prints "Hello, world!" 5 times like this: Hello, world! Hello, world! Hello, world!

Code 3 - Hello, world! program, 5 times

C
4 years ago
// Hello, world! program in pure C, that prints 5 times #include <stdio.h> void main() { int a; for(a = 1; a < 6; ++a ) { printf("Hello, world!\n"); /* prints "Hello, world!" 5 times like this: Hello, world! Hello, world! Hello, world!

Code 2 - The number "x" 10 times

C
4 years ago
// Program to print the number "x" on screen, 10 times in pure C #include <stdio.h> void main() { int x; for (x = 1; x < 11; ++x) { printf("%d \n", x); /* prints the number "x" on screen 10 times such as: 1

Code 3 - The number "x" 10 times

D
4 years ago
// Program to print the number "x" on screen, 10 times in pure D import std.stdio; void main() { for (int x = 1; x < 11; x = x + 1) { writeln(x); /* prints the number "x" on screen 10 times such as: 1 2

Code 2 - Hello, world! program, 5 times

D
4 years ago
// Hello, world! program in pure D, that prints 5 times import std.stdio; void main() { for( int a = 1; a < 6; a = a + 1 ) { writeln("Hello, world!"); /* prints "Hello, world!" 5 times like this: Hello, world! Hello, world! Hello, world! Hello, world!

Code 5 - The number "x" 10 times

Python
4 years ago
# Program to print the number "x" on screen, 10 times in Python for x in range(1,11): print(x) # prints the number "x" on screen 10 times # such as: # 1 # 2 # 3 # ... else:

Code 4 - Hello, world! 5 times

Python
4 years ago
# Program to print "Hello, world!" on screen, 5 times in Python for x in range(5): print("Hello, world!") # prints "Hello, world!" 5 times else: print("\nDone!")

Code 4 - Read a number

C#
4 years ago
/* Read a number Programming in C# */ using System; namespace Program { class Number2 { public static void Main() { string num;

Check the number if is greater or less than 50

C#
4 years ago
/* Check the number if is greater or less than 50 Programming in C# */ using System; namespace Program { class Number { public static void Main() { string num;

Check the number if is greater or less than 50

Fortran
4 years ago
! Check the number if is greater or less than 50 ! Fortan Programming READ(*, *)NUM IF(NUM.EQ.50)THEN WRITE(*, *) "The number is equal with 50, You entered: ", NUM ELSEIF(NUM.LT.50)THEN WRITE(*, *) "The number is less than 50, You entered: ", NUM ELSEIF(NUM.GT.50)THEN WRITE(*, *) "The number is greater than 50, You entered: ", NUM ENDIF

Roulette in C#

C#
4 years ago
/* Roulette in C#, 48 numbers By Mihai Popa Programming in C# */ using System; namespace MyCompiler { class Program { public static void Main() {

C++ Hello, world!, normal code

C++
4 years ago
// C++ Hello, world! example #include <iostream> int main() { std::cout << "Hello world!\n"; }

Hello, world! example in Rust, simpler!

Rust
4 years ago
// Hello, world! in the Rust programming language, simpler code fn main () { println!("Hello, world!"); }

Hello, world! example in Rust

Rust
4 years ago
// Hello, world! in the Rust programming language fn main () { println!("Hello, world!"); }

C# Hello, world!

C#
4 years ago
/* C# Hello, world! Programming in C# */ using System; namespace Program { class Hello { public static void Main (String[] args) { Console.WriteLine("Hello, world!");

C++ Hello, world!

C++
4 years ago
// C++ Hello, world! example, most simple code #include <iostream> int main() { std::cout << "Hello world!\n";}

Hello, world! program

TypeScript
4 years ago
// Hello, world! in TS (TypeScript) console.log("Hello, world!");

Hello, world! program

NodeJS
4 years ago
/* The first NodeJS example The Hello, world! program */ console.log("Hello, world!");

Car Table

R
4 years ago
# The car table program in R # Generate a dataframe using 4 varabiles (car,kph,mph,cost) # Also includes a bike, motocycle and a normal human (normal speed vs running) car <- c ("Normal human", "Running human", "Bike", "Motorcycle", "Car", "4x4 car", "Racing car", "Powerful racing car", "Plane") kph <- c (5, 15, 25, 50, 100, 150, 250, 400, 750) mph <- c (3, 9, 15, 31, 62, 93, 155, 249, 466)

Hello, world program in Ruby

Ruby
4 years ago
# Hello, world program in Ruby puts "Hello, world!" # prints "Hello, world!" on screen