First appeared FeaturesPopular uses
BasicPRINT "Hello, world!" 30 PRINT "I'm learning about commands in BASIC.“40 PRINT "This text is being printed via the PRINT command.“50 PRINT "On the next line, I'll use CLS." 60 CLS "Now the next word would be PRINT."
First appeared FeaturesPopular uses
Cmain() { int number; printf("Enter an integer\n"); scanf("%d",&number); printf("Integer entered by you is %d\n", number); return 0; }
First appeared FeaturesPopular uses
Scheme
First appeared FeaturesPopular uses
Pythonprint (“hello world”)Input = name ()Print (“hello ” + name + “ how are you”)
First appeared FeaturesPopular uses
Java int radius = 0; System.out.println("Please enter radius of a circle"); try { //get the radius from console BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); radius = Integer.parseInt(br.readLine()); } //if invalid value was entered catch(NumberFormatException ne) { System.out.println("Invalid radius value" + ne); System.exit(0); } catch(IOException ioe)
First appeared FeaturesPopular uses
Ruby# Operators are really method invocations. a = 10 b = 3.*(a).+(2) Kernel::printf("%d %d\n", a, b); # Type is still dynamic. b = String.new("A string") c = 'Another String' Kernel.print(b.+(" and ")::+(c).+("\n"))
First appeared FeaturesPopular uses
C#public class Hello3 { public static void Main(string[] args) { Console.WriteLine("Hello, World!"); Console.WriteLine("You entered the following {0} command line arguments:", args.Length ); for (int i=0; i < args.Length; i++) { Console.WriteLine("{0}", args[i]); }
First appeared FeaturesPopular uses
Scratch
First appeared FeaturesPopular uses
PHP<?php$color = "red";echo "My car is " . $color . "<br>";echo "My house is " . $COLOR . "<br>";echo "My boat is " . $coLOR . "<br>";?>
First appeared FeaturesPopular uses
JavaScript<h1>JavaScript Statements</h1>
<p>Statements are separated by semicolons.</p>
<p>The variables x, y, and z are assigned the values 5, 6, and 11:</p>
<p id="demo"></p>
<script>var x = 5;var y = 6;var z = x + y;document.getElementById("demo").innerHTML = z;</script>
</body></html>
First appeared FeaturesPopular uses
Visual Basic .NET
left2 = Int(Rnd * 7000) + 1000left3 = Int(Rnd * 7000) + 1000top1 = Int(Rnd * 5000) + 100top2 = Int(Rnd * 5000) + 100top3 = Int(Rnd * 5000) + 100Image2.Left = left1Image3.Left = left2Image4.Left = left3Image2.Top = top1Image3.Top = top2Image4.Top = top3w = 0score = 0
First appeared FeaturesPopular uses
Pascalvariables here if necessary BEGIN Some Code; END; FUNCTION FunctionName(variableList): VariableType; variables here if necessary BEGIN Some Code if necessary; FunctionName := some expression More Code if necessary; END; ... more functions
First appeared FeaturesPopular uses
COBOL000050 ENVIRONMENT DIVISION. 000060 INPUT-OUTPUT SECTION. 000070 FILE-CONTROL. 000080 SELECT STUDENT-FILE ASSIGN TO SYSIN 000090 ORGANIZATION IS LINE SEQUENTIAL. 000100 SELECT PRINT-FILE ASSIGN TO SYSOUT 000110 ORGANIZATION
First appeared FeaturesPopular uses
Perlbg = $ARGV[0]; $inbase = $ARGV[1]; $outbase = $ARGV[2]; $start = $ARGV[3]; $stop = $ARGV[4]; # for each image
First appeared FeaturesPopular uses
ALGOL 68mode, op, prio, proc, flex, heap, loc, long, ref, short, bits, bool, bytes, char, compl, int, real, sema, string, void, channel, file, format, struct, union, at "@", eitherr0, is ":=:", isnt is notr0 ":/=:" ":≠:", of "→"r0, true, false, empty, nil "○", skip "~", co "¢", comment "¢", pr, pragmat, case ~ in ~ ouse ~ in ~ out ~ esac "( ~ | ~ |: ~ | ~ | ~ )", for ~ from ~ to ~ by ~ while ~ do
First appeared FeaturesPopular uses
Prologlikes(mary,food). likes(mary,wine). likes(john,wine). likes(john,mary). The following queries yield the specified answers. | ?- likes(mary,food). yes. | ?- likes(john,wine). yes. | ?- likes(john
First appeared FeaturesPopular uses
Haskell
First appeared FeaturesPopular uses
C++std::vector<int> target2(5);std::vector<int> target3;template <typename RangeOfInts>void foo(RangeOfInts source){ std::vector<int> target1{std::begin(source), std::end(source)};
First appeared FeaturesPopular uses
AssemblyMOV r0, #0C ;load base address of string into r0LOAD: MOV r1,(r0) ;load contents into r1CALL PRINT ; call a print routine to print the character in r1INC r0 ;point to next characterJMP LOAD ;load next character
Top Related