WeixiangYan/CodeTransOcean huggingface dataset:
Task: Integer comparison


C++: #include <iostream>

int main()
{
  int a, b;

  if (!(std::cin >> a >> b)) {
    std::cerr << "could not read the numbers\n";
    return 1;
  }

  
  if (a < b)
    std::cout << a << " is less than " << b << "\n";

  
  if (a == b)
    std::cout << a << " is equal to " << b << "\n";

  
  if (a > b)
    std::cout << a << " is greater than " << b << "\n";
}










Ada: with Ada.Text_IO; use Ada.Text_IO;
with Ada.Integer_Text_IO; use Ada.Integer_Text_Io;

procedure Compare_Ints is
   A, B : Integer;
begin
   Get(Item => A);
   Get(Item => B);

   
   if A = B then
      Put_Line("A equals B");
   end if;

   
   if A < B then
      Put_Line("A is less than B");
   end if;

   
   if A > B then
      Put_Line("A is greater than B");
   end if;
end Compare_Ints;
Task: Integer comparison




Go: package main

import (
	"fmt"
	"log"
)

func main() {
	var n1, n2 int
	fmt.Print("enter number: ")
	if _, err := fmt.Scan(&n1); err != nil {
		log.Fatal(err)
	}
	fmt.Print("enter number: ")
	if _, err := fmt.Scan(&n2); err != nil {
		log.Fatal(err)
	}
	switch {
	case n1 < n2:
		fmt.Println(n1, "less than", n2)
	case n1 == n2:
		fmt.Println(n1, "equal to", n2)
	case n1 > n2:
		fmt.Println(n1, "greater than", n2)
	}
}








Ada: with Ada.Text_IO; use Ada.Text_IO;
with Ada.Integer_Text_IO; use Ada.Integer_Text_Io;

procedure Compare_Ints is
   A, B : Integer;
begin
   Get(Item => A);
   Get(Item => B);

   
   if A = B then
      Put_Line("A equals B");
   end if;

   
   if A < B then
      Put_Line("A is less than B");
   end if;

   
   if A > B then
      Put_Line("A is greater than B");
   end if;
end Compare_Ints;
Task: Integer comparison





Java: import java.io.*;

public class compInt {
   public static void main(String[] args) {
       try {
           BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

           int nbr1 = Integer.parseInt(in.readLine());
           int nbr2 = Integer.parseInt(in.readLine());

           if(nbr1<nbr2)
               System.out.println(nbr1 + " is less than " + nbr2);

           if(nbr1>nbr2)
                System.out.println(nbr1 + " is greater than " + nbr2);

           if(nbr1==nbr2)
                System.out.println(nbr1 + " is equal to " + nbr2);
       } catch(IOException e) { }
   }
}







Ada: with Ada.Text_IO; use Ada.Text_IO;
with Ada.Integer_Text_IO; use Ada.Integer_Text_Io;

procedure Compare_Ints is
   A, B : Integer;
begin
   Get(Item => A);
   Get(Item => B);

   
   if A = B then
      Put_Line("A equals B");
   end if;

   
   if A < B then
      Put_Line("A is less than B");
   end if;

   
   if A > B then
      Put_Line("A is greater than B");
   end if;
end Compare_Ints;
Task: Integer comparison







Python: let a = input('Enter value of a: ')
let b = input('Enter value of b: ')

if a < b:
    print 'a is less than b'
elif a > b:
    print 'a is greater than b'
elif a == b:
    print 'a is equal to b'





Ada: with Ada.Text_IO; use Ada.Text_IO;
with Ada.Integer_Text_IO; use Ada.Integer_Text_Io;

procedure Compare_Ints is
   A, B : Integer;
begin
   Get(Item => A);
   Get(Item => B);

   
   if A = B then
      Put_Line("A equals B");
   end if;

   
   if A < B then
      Put_Line("A is less than B");
   end if;

   
   if A > B then
      Put_Line("A is greater than B");
   end if;
end Compare_Ints;
Task: Integer comparison








VB: Public Sub integer_comparison()
    first_integer = CInt(InputBox("Give me an integer."))
    second_integer = CInt(InputBox("Give me another integer."))
    Debug.Print IIf(first_integer < second_integer, "first integer is smaller than second integer", "first integer is not smaller than second integer")
    Debug.Print IIf(first_integer = second_integer, "first integer is equal to second integer", "first integer is not equal to second integer")
    Debug.Print IIf(first_integer > second_integer, "first integer is bigger than second integer", "first integer is not bigger than second integer")
End Sub




Ada: with Ada.Text_IO; use Ada.Text_IO;
with Ada.Integer_Text_IO; use Ada.Integer_Text_Io;

procedure Compare_Ints is
   A, B : Integer;
begin
   Get(Item => A);
   Get(Item => B);

   
   if A = B then
      Put_Line("A equals B");
   end if;

   
   if A < B then
      Put_Line("A is less than B");
   end if;

   
   if A > B then
      Put_Line("A is greater than B");
   end if;
end Compare_Ints;
Task: Integer comparison

C: #include <stdio.h>

int main()
{
  int a, b;
  scanf("%d %d", &a, &b);

  if (a < b)
    printf("%d is less than %d\n", a, b);

  if (a == b)
    printf("%d is equal to %d\n", a, b);

  if (a > b)
    printf("%d is greater than %d\n", a, b);

  return 0;
}
Task: Integer comparison



C#: using System;

class Program
{
    static void Main()
    {
        int a = int.Parse(Console.ReadLine());
        int b = int.Parse(Console.ReadLine());
        if (a < b)
            Console.WriteLine("{0} is less than {1}", a, b);
        if (a == b)
            Console.WriteLine("{0} equals {1}", a, b);
        if (a > b)
            Console.WriteLine("{0} is greater than {1}", a, b);
    }
}
Task: Integer comparison


C++: #include <iostream>

int main()
{
  int a, b;

  if (!(std::cin >> a >> b)) {
    std::cerr << "could not read the numbers\n";
    return 1;
  }

  
  if (a < b)
    std::cout << a << " is less than " << b << "\n";

  
  if (a == b)
    std::cout << a << " is equal to " << b << "\n";

  
  if (a > b)
    std::cout << a << " is greater than " << b << "\n";
}
Task: Integer comparison





Java: import java.io.*;

public class compInt {
   public static void main(String[] args) {
       try {
           BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

           int nbr1 = Integer.parseInt(in.readLine());
           int nbr2 = Integer.parseInt(in.readLine());

           if(nbr1<nbr2)
               System.out.println(nbr1 + " is less than " + nbr2);

           if(nbr1>nbr2)
                System.out.println(nbr1 + " is greater than " + nbr2);

           if(nbr1==nbr2)
                System.out.println(nbr1 + " is equal to " + nbr2);
       } catch(IOException e) { }
   }
}
Task: Integer comparison







Python: let a = input('Enter value of a: ')
let b = input('Enter value of b: ')

if a < b:
    print 'a is less than b'
elif a > b:
    print 'a is greater than b'
elif a == b:
    print 'a is equal to b'
Task: Integer comparison








VB: Public Sub integer_comparison()
    first_integer = CInt(InputBox("Give me an integer."))
    second_integer = CInt(InputBox("Give me another integer."))
    Debug.Print IIf(first_integer < second_integer, "first integer is smaller than second integer", "first integer is not smaller than second integer")
    Debug.Print IIf(first_integer = second_integer, "first integer is equal to second integer", "first integer is not equal to second integer")
    Debug.Print IIf(first_integer > second_integer, "first integer is bigger than second integer", "first integer is not bigger than second integer")
End Sub
Task: Integer comparison




Go: package main

import (
	"fmt"
	"log"
)

func main() {
	var n1, n2 int
	fmt.Print("enter number: ")
	if _, err := fmt.Scan(&n1); err != nil {
		log.Fatal(err)
	}
	fmt.Print("enter number: ")
	if _, err := fmt.Scan(&n2); err != nil {
		log.Fatal(err)
	}
	switch {
	case n1 < n2:
		fmt.Println(n1, "less than", n2)
	case n1 == n2:
		fmt.Println(n1, "equal to", n2)
	case n1 > n2:
		fmt.Println(n1, "greater than", n2)
	}
}
Task: Integer comparison



C#: using System;

class Program
{
    static void Main()
    {
        int a = int.Parse(Console.ReadLine());
        int b = int.Parse(Console.ReadLine());
        if (a < b)
            Console.WriteLine("{0} is less than {1}", a, b);
        if (a == b)
            Console.WriteLine("{0} equals {1}", a, b);
        if (a > b)
            Console.WriteLine("{0} is greater than {1}", a, b);
    }
}








Fortran: program arithif
integer a, b

c        fortran 77 I/O statements, for simplicity
read(*,*) a, b

if ( a - b ) 10, 20, 30
10 write(*,*) a, ' is less than ', b
   goto 40

20 write(*,*) a, ' is equal to ', b
   goto 40

30 write(*,*) a, ' is greater than ', b
40 continue

end
Task: Integer comparison


C++: #include <iostream>

int main()
{
  int a, b;

  if (!(std::cin >> a >> b)) {
    std::cerr << "could not read the numbers\n";
    return 1;
  }

  
  if (a < b)
    std::cout << a << " is less than " << b << "\n";

  
  if (a == b)
    std::cout << a << " is equal to " << b << "\n";

  
  if (a > b)
    std::cout << a << " is greater than " << b << "\n";
}









Fortran: program arithif
integer a, b

c        fortran 77 I/O statements, for simplicity
read(*,*) a, b

if ( a - b ) 10, 20, 30
10 write(*,*) a, ' is less than ', b
   goto 40

20 write(*,*) a, ' is equal to ', b
   goto 40

30 write(*,*) a, ' is greater than ', b
40 continue

end
Task: Integer comparison

C: #include <stdio.h>

int main()
{
  int a, b;
  scanf("%d %d", &a, &b);

  if (a < b)
    printf("%d is less than %d\n", a, b);

  if (a == b)
    printf("%d is equal to %d\n", a, b);

  if (a > b)
    printf("%d is greater than %d\n", a, b);

  return 0;
}










Fortran: program arithif
integer a, b

c        fortran 77 I/O statements, for simplicity
read(*,*) a, b

if ( a - b ) 10, 20, 30
10 write(*,*) a, ' is less than ', b
   goto 40

20 write(*,*) a, ' is equal to ', b
   goto 40

30 write(*,*) a, ' is greater than ', b
40 continue

end
Task: Integer comparison





Java: import java.io.*;

public class compInt {
   public static void main(String[] args) {
       try {
           BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

           int nbr1 = Integer.parseInt(in.readLine());
           int nbr2 = Integer.parseInt(in.readLine());

           if(nbr1<nbr2)
               System.out.println(nbr1 + " is less than " + nbr2);

           if(nbr1>nbr2)
                System.out.println(nbr1 + " is greater than " + nbr2);

           if(nbr1==nbr2)
                System.out.println(nbr1 + " is equal to " + nbr2);
       } catch(IOException e) { }
   }
}






Fortran: program arithif
integer a, b

c        fortran 77 I/O statements, for simplicity
read(*,*) a, b

if ( a - b ) 10, 20, 30
10 write(*,*) a, ' is less than ', b
   goto 40

20 write(*,*) a, ' is equal to ', b
   goto 40

30 write(*,*) a, ' is greater than ', b
40 continue

end
Task: Integer comparison







Python: let a = input('Enter value of a: ')
let b = input('Enter value of b: ')

if a < b:
    print 'a is less than b'
elif a > b:
    print 'a is greater than b'
elif a == b:
    print 'a is equal to b'




Fortran: program arithif
integer a, b

c        fortran 77 I/O statements, for simplicity
read(*,*) a, b

if ( a - b ) 10, 20, 30
10 write(*,*) a, ' is less than ', b
   goto 40

20 write(*,*) a, ' is equal to ', b
   goto 40

30 write(*,*) a, ' is greater than ', b
40 continue

end
Task: Integer comparison








VB: Public Sub integer_comparison()
    first_integer = CInt(InputBox("Give me an integer."))
    second_integer = CInt(InputBox("Give me another integer."))
    Debug.Print IIf(first_integer < second_integer, "first integer is smaller than second integer", "first integer is not smaller than second integer")
    Debug.Print IIf(first_integer = second_integer, "first integer is equal to second integer", "first integer is not equal to second integer")
    Debug.Print IIf(first_integer > second_integer, "first integer is bigger than second integer", "first integer is not bigger than second integer")
End Sub



Fortran: program arithif
integer a, b

c        fortran 77 I/O statements, for simplicity
read(*,*) a, b

if ( a - b ) 10, 20, 30
10 write(*,*) a, ' is less than ', b
   goto 40

20 write(*,*) a, ' is equal to ', b
   goto 40

30 write(*,*) a, ' is greater than ', b
40 continue

end
Task: Integer comparison






PHP: <?php

echo "Enter an integer [int1]: ";
fscanf(STDIN, "%d\n", $int1);
if(!is_numeric($int1)) {
  echo "Invalid input; terminating.\n";
  exit(1);      // return w/ general error
}

echo "Enter an integer [int2]: ";
fscanf(STDIN, "%d\n", $int2);
if(!is_numeric($int2)) {
  echo "Invalid input; terminating.\n";
  exit(1);      // return w/ general error
}



if($int1 < $int2)
  echo "int1 < int2\n";
if($int1 == $int2)
  echo "int1 = int2\n";
if($int1 > $int2)
  echo "int1 > int2\n";

?>





Fortran: program arithif
integer a, b

c        fortran 77 I/O statements, for simplicity
read(*,*) a, b

if ( a - b ) 10, 20, 30
10 write(*,*) a, ' is less than ', b
   goto 40

20 write(*,*) a, ' is equal to ', b
   goto 40

30 write(*,*) a, ' is greater than ', b
40 continue

end
Task: Integer comparison

C: #include <stdio.h>

int main()
{
  int a, b;
  scanf("%d %d", &a, &b);

  if (a < b)
    printf("%d is less than %d\n", a, b);

  if (a == b)
    printf("%d is equal to %d\n", a, b);

  if (a > b)
    printf("%d is greater than %d\n", a, b);

  return 0;
}









COBOL:        IDENTIFICATION DIVISION.
       PROGRAM-ID. Int-Compare.

       DATA DIVISION.
       WORKING-STORAGE SECTION.
       01  A PIC 9(10).
       01  B PIC 9(10).

       PROCEDURE DIVISION.
           DISPLAY "First number: " WITH NO ADVANCING
           ACCEPT A
           DISPLAY "Second number: " WITH NO ADVANCING
           ACCEPT B 

*          
*          
           IF A < B
               DISPLAY A " is less than " B
           ELSE IF A = B
               DISPLAY A " is equal to " B
           ELSE IF A > B
               DISPLAY A " is larger than " B
           END-IF.

           GOBACK
           .
Task: Integer comparison



C#: using System;

class Program
{
    static void Main()
    {
        int a = int.Parse(Console.ReadLine());
        int b = int.Parse(Console.ReadLine());
        if (a < b)
            Console.WriteLine("{0} is less than {1}", a, b);
        if (a == b)
            Console.WriteLine("{0} equals {1}", a, b);
        if (a > b)
            Console.WriteLine("{0} is greater than {1}", a, b);
    }
}







COBOL:        IDENTIFICATION DIVISION.
       PROGRAM-ID. Int-Compare.

       DATA DIVISION.
       WORKING-STORAGE SECTION.
       01  A PIC 9(10).
       01  B PIC 9(10).

       PROCEDURE DIVISION.
           DISPLAY "First number: " WITH NO ADVANCING
           ACCEPT A
           DISPLAY "Second number: " WITH NO ADVANCING
           ACCEPT B 

*          
*          
           IF A < B
               DISPLAY A " is less than " B
           ELSE IF A = B
               DISPLAY A " is equal to " B
           ELSE IF A > B
               DISPLAY A " is larger than " B
           END-IF.

           GOBACK
           .
Task: Integer comparison


C++: #include <iostream>

int main()
{
  int a, b;

  if (!(std::cin >> a >> b)) {
    std::cerr << "could not read the numbers\n";
    return 1;
  }

  
  if (a < b)
    std::cout << a << " is less than " << b << "\n";

  
  if (a == b)
    std::cout << a << " is equal to " << b << "\n";

  
  if (a > b)
    std::cout << a << " is greater than " << b << "\n";
}








COBOL:        IDENTIFICATION DIVISION.
       PROGRAM-ID. Int-Compare.

       DATA DIVISION.
       WORKING-STORAGE SECTION.
       01  A PIC 9(10).
       01  B PIC 9(10).

       PROCEDURE DIVISION.
           DISPLAY "First number: " WITH NO ADVANCING
           ACCEPT A
           DISPLAY "Second number: " WITH NO ADVANCING
           ACCEPT B 

*          
*          
           IF A < B
               DISPLAY A " is less than " B
           ELSE IF A = B
               DISPLAY A " is equal to " B
           ELSE IF A > B
               DISPLAY A " is larger than " B
           END-IF.

           GOBACK
           .
Task: Integer comparison





Java: import java.io.*;

public class compInt {
   public static void main(String[] args) {
       try {
           BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

           int nbr1 = Integer.parseInt(in.readLine());
           int nbr2 = Integer.parseInt(in.readLine());

           if(nbr1<nbr2)
               System.out.println(nbr1 + " is less than " + nbr2);

           if(nbr1>nbr2)
                System.out.println(nbr1 + " is greater than " + nbr2);

           if(nbr1==nbr2)
                System.out.println(nbr1 + " is equal to " + nbr2);
       } catch(IOException e) { }
   }
}





COBOL:        IDENTIFICATION DIVISION.
       PROGRAM-ID. Int-Compare.

       DATA DIVISION.
       WORKING-STORAGE SECTION.
       01  A PIC 9(10).
       01  B PIC 9(10).

       PROCEDURE DIVISION.
           DISPLAY "First number: " WITH NO ADVANCING
           ACCEPT A
           DISPLAY "Second number: " WITH NO ADVANCING
           ACCEPT B 

*          
*          
           IF A < B
               DISPLAY A " is less than " B
           ELSE IF A = B
               DISPLAY A " is equal to " B
           ELSE IF A > B
               DISPLAY A " is larger than " B
           END-IF.

           GOBACK
           .
Task: Integer comparison







Python: let a = input('Enter value of a: ')
let b = input('Enter value of b: ')

if a < b:
    print 'a is less than b'
elif a > b:
    print 'a is greater than b'
elif a == b:
    print 'a is equal to b'



COBOL:        IDENTIFICATION DIVISION.
       PROGRAM-ID. Int-Compare.

       DATA DIVISION.
       WORKING-STORAGE SECTION.
       01  A PIC 9(10).
       01  B PIC 9(10).

       PROCEDURE DIVISION.
           DISPLAY "First number: " WITH NO ADVANCING
           ACCEPT A
           DISPLAY "Second number: " WITH NO ADVANCING
           ACCEPT B 

*          
*          
           IF A < B
               DISPLAY A " is less than " B
           ELSE IF A = B
               DISPLAY A " is equal to " B
           ELSE IF A > B
               DISPLAY A " is larger than " B
           END-IF.

           GOBACK
           .
Task: Integer comparison








VB: Public Sub integer_comparison()
    first_integer = CInt(InputBox("Give me an integer."))
    second_integer = CInt(InputBox("Give me another integer."))
    Debug.Print IIf(first_integer < second_integer, "first integer is smaller than second integer", "first integer is not smaller than second integer")
    Debug.Print IIf(first_integer = second_integer, "first integer is equal to second integer", "first integer is not equal to second integer")
    Debug.Print IIf(first_integer > second_integer, "first integer is bigger than second integer", "first integer is not bigger than second integer")
End Sub


COBOL:        IDENTIFICATION DIVISION.
       PROGRAM-ID. Int-Compare.

       DATA DIVISION.
       WORKING-STORAGE SECTION.
       01  A PIC 9(10).
       01  B PIC 9(10).

       PROCEDURE DIVISION.
           DISPLAY "First number: " WITH NO ADVANCING
           ACCEPT A
           DISPLAY "Second number: " WITH NO ADVANCING
           ACCEPT B 

*          
*          
           IF A < B
               DISPLAY A " is less than " B
           ELSE IF A = B
               DISPLAY A " is equal to " B
           ELSE IF A > B
               DISPLAY A " is larger than " B
           END-IF.

           GOBACK
           .
Task: Integer comparison




Go: package main

import (
	"fmt"
	"log"
)

func main() {
	var n1, n2 int
	fmt.Print("enter number: ")
	if _, err := fmt.Scan(&n1); err != nil {
		log.Fatal(err)
	}
	fmt.Print("enter number: ")
	if _, err := fmt.Scan(&n2); err != nil {
		log.Fatal(err)
	}
	switch {
	case n1 < n2:
		fmt.Println(n1, "less than", n2)
	case n1 == n2:
		fmt.Println(n1, "equal to", n2)
	case n1 > n2:
		fmt.Println(n1, "greater than", n2)
	}
}






COBOL:        IDENTIFICATION DIVISION.
       PROGRAM-ID. Int-Compare.

       DATA DIVISION.
       WORKING-STORAGE SECTION.
       01  A PIC 9(10).
       01  B PIC 9(10).

       PROCEDURE DIVISION.
           DISPLAY "First number: " WITH NO ADVANCING
           ACCEPT A
           DISPLAY "Second number: " WITH NO ADVANCING
           ACCEPT B 

*          
*          
           IF A < B
               DISPLAY A " is less than " B
           ELSE IF A = B
               DISPLAY A " is equal to " B
           ELSE IF A > B
               DISPLAY A " is larger than " B
           END-IF.

           GOBACK
           .
Task: Integer comparison






PHP: <?php

echo "Enter an integer [int1]: ";
fscanf(STDIN, "%d\n", $int1);
if(!is_numeric($int1)) {
  echo "Invalid input; terminating.\n";
  exit(1);      // return w/ general error
}

echo "Enter an integer [int2]: ";
fscanf(STDIN, "%d\n", $int2);
if(!is_numeric($int2)) {
  echo "Invalid input; terminating.\n";
  exit(1);      // return w/ general error
}



if($int1 < $int2)
  echo "int1 < int2\n";
if($int1 == $int2)
  echo "int1 = int2\n";
if($int1 > $int2)
  echo "int1 > int2\n";

?>
Task: Integer comparison






PHP: <?php

echo "Enter an integer [int1]: ";
fscanf(STDIN, "%d\n", $int1);
if(!is_numeric($int1)) {
  echo "Invalid input; terminating.\n";
  exit(1);      // return w/ general error
}

echo "Enter an integer [int2]: ";
fscanf(STDIN, "%d\n", $int2);
if(!is_numeric($int2)) {
  echo "Invalid input; terminating.\n";
  exit(1);      // return w/ general error
}



if($int1 < $int2)
  echo "int1 < int2\n";
if($int1 == $int2)
  echo "int1 = int2\n";
if($int1 > $int2)
  echo "int1 > int2\n";

?>






Ada: with Ada.Text_IO; use Ada.Text_IO;
with Ada.Integer_Text_IO; use Ada.Integer_Text_Io;

procedure Compare_Ints is
   A, B : Integer;
begin
   Get(Item => A);
   Get(Item => B);

   
   if A = B then
      Put_Line("A equals B");
   end if;

   
   if A < B then
      Put_Line("A is less than B");
   end if;

   
   if A > B then
      Put_Line("A is greater than B");
   end if;
end Compare_Ints;
Task: Integer comparison






PHP: <?php

echo "Enter an integer [int1]: ";
fscanf(STDIN, "%d\n", $int1);
if(!is_numeric($int1)) {
  echo "Invalid input; terminating.\n";
  exit(1);      // return w/ general error
}

echo "Enter an integer [int2]: ";
fscanf(STDIN, "%d\n", $int2);
if(!is_numeric($int2)) {
  echo "Invalid input; terminating.\n";
  exit(1);      // return w/ general error
}



if($int1 < $int2)
  echo "int1 < int2\n";
if($int1 == $int2)
  echo "int1 = int2\n";
if($int1 > $int2)
  echo "int1 > int2\n";

?>




COBOL:        IDENTIFICATION DIVISION.
       PROGRAM-ID. Int-Compare.

       DATA DIVISION.
       WORKING-STORAGE SECTION.
       01  A PIC 9(10).
       01  B PIC 9(10).

       PROCEDURE DIVISION.
           DISPLAY "First number: " WITH NO ADVANCING
           ACCEPT A
           DISPLAY "Second number: " WITH NO ADVANCING
           ACCEPT B 

*          
*          
           IF A < B
               DISPLAY A " is less than " B
           ELSE IF A = B
               DISPLAY A " is equal to " B
           ELSE IF A > B
               DISPLAY A " is larger than " B
           END-IF.

           GOBACK
           .
Task: Environment variables



C#: using System;

namespace RosettaCode {
    class Program {
        static void Main() {
            string temp = Environment.GetEnvironmentVariable("TEMP");
            Console.WriteLine("TEMP is " + temp);
        }
    }
}









Ada: with Ada.Environment_Variables; use Ada.Environment_Variables;
with Ada.Text_Io; use Ada.Text_Io;

procedure Print_Path is
begin
   Put_Line("Path : " & Value("PATH"));
end Print_Path;
Task: Environment variables

C: #include <stdlib.h>
#include <stdio.h>
 
int main() {
  puts(getenv("HOME"));
  puts(getenv("PATH"));
  puts(getenv("USER"));
  return 0;
}











Ada: with Ada.Environment_Variables; use Ada.Environment_Variables;
with Ada.Text_Io; use Ada.Text_Io;

procedure Print_Path is
begin
   Put_Line("Path : " & Value("PATH"));
end Print_Path;
Task: Environment variables


C++: #include <cstdlib>
#include <cstdio>

int main()
{
   puts(getenv("HOME"));
   return 0;
}










Ada: with Ada.Environment_Variables; use Ada.Environment_Variables;
with Ada.Text_Io; use Ada.Text_Io;

procedure Print_Path is
begin
   Put_Line("Path : " & Value("PATH"));
end Print_Path;
Task: Environment variables




Go: package main

import (
    "fmt"
    "os"
)

func main() {
    fmt.Println(os.Getenv("SHELL"))
}








Ada: with Ada.Environment_Variables; use Ada.Environment_Variables;
with Ada.Text_Io; use Ada.Text_Io;

procedure Print_Path is
begin
   Put_Line("Path : " & Value("PATH"));
end Print_Path;