kazuyamaa/multi-language-messages-01 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";
}

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
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);
    }
}

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);
    }
}

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
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);
    }
}

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
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) { }
   }
}

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
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) { }
   }
}

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)
	}
}

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
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)
	}
}

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
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'

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
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";
}

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
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";
}

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
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);
    }
}

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
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)
	}
}

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
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);
    }
}

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
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;
}

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
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);
    }
}

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
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";
}

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
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)
	}
}

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
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) { }
   }
}

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
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'

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
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

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: Non-decimal radices_Output
C: #include <stdio.h>

int main()
{
  int i;

  for(i=1; i <= 33; i++)
    printf("%6d %6x %6o\n", i, i, i);

  return 0;
}

C#: using System;

namespace NonDecimalRadicesOutput
{
    class Program
    {
        static void Main(string[] args)
        {
            for (int i = 0; i < 42; i++)
            {
                string binary = Convert.ToString(i, 2);
                string octal = Convert.ToString(i, 8);
                string hexadecimal = Convert.ToString(i, 16);
                Console.WriteLine(string.Format("Decimal: {0}, Binary: {1}, Octal: {2}, Hexadecimal: {3}", i, binary, octal, hexadecimal));
            }

            Console.ReadKey();
        }
    }
}
Task: Non-decimal radices_Output
C: #include <stdio.h>

int main()
{
  int i;

  for(i=1; i <= 33; i++)
    printf("%6d %6x %6o\n", i, i, i);

  return 0;
}

C++: #include <iostream>
#include <iomanip>

int main()
{
  for (int i = 0; i <= 33; i++)
    std::cout << std::setw(6) << std::dec << i << " "
              << std::setw(6) << std::hex << i << " "
              << std::setw(6) << std::oct << i << std::endl;

  return 0;
}
Task: Non-decimal radices_Output
C: #include <stdio.h>

int main()
{
  int i;

  for(i=1; i <= 33; i++)
    printf("%6d %6x %6o\n", i, i, i);

  return 0;
}

Java: public static void main(String args[]){
   for(int a= 0;a < 33;a++){
      System.out.println(Integer.toBinaryString(a));
      System.out.println(Integer.toOctalString(a));
      System.out.println(Integer.toHexString(a));
      
      

      System.out.printf("%3o %2d %2x\n",a ,a ,a); 
   }
}
Task: Non-decimal radices_Output
C++: #include <iostream>
#include <iomanip>

int main()
{
  for (int i = 0; i <= 33; i++)
    std::cout << std::setw(6) << std::dec << i << " "
              << std::setw(6) << std::hex << i << " "
              << std::setw(6) << std::oct << i << std::endl;

  return 0;
}

Java: public static void main(String args[]){
   for(int a= 0;a < 33;a++){
      System.out.println(Integer.toBinaryString(a));
      System.out.println(Integer.toOctalString(a));
      System.out.println(Integer.toHexString(a));
      
      

      System.out.printf("%3o %2d %2x\n",a ,a ,a); 
   }
}
Task: Non-decimal radices_Output
C++: #include <iostream>
#include <iomanip>

int main()
{
  for (int i = 0; i <= 33; i++)
    std::cout << std::setw(6) << std::dec << i << " "
              << std::setw(6) << std::hex << i << " "
              << std::setw(6) << std::oct << i << std::endl;

  return 0;
}

Python: >>> for n in range(34):
  print " {0:6b} {1:3o} {2:2d} {3:2X}".format(n, n, n, n)
  
  
  

  
      0   0  0  0
      1   1  1  1
     10   2  2  2
     11   3  3  3
    100   4  4  4
    101   5  5  5
    110   6  6  6
    111   7  7  7
   1000  10  8  8
   1001  11  9  9
   1010  12 10  A
   1011  13 11  B
   1100  14 12  C
   1101  15 13  D
   1110  16 14  E
   1111  17 15  F
  10000  20 16 10
  10001  21 17 11
  10010  22 18 12
  10011  23 19 13
  10100  24 20 14
  10101  25 21 15
  10110  26 22 16
  10111  27 23 17
  11000  30 24 18
  11001  31 25 19
  11010  32 26 1A
  11011  33 27 1B
  11100  34 28 1C
  11101  35 29 1D
  11110  36 30 1E
  11111  37 31 1F
 100000  40 32 20
 100001  41 33 21
>>>
Task: Non-decimal radices_Output
C#: using System;

namespace NonDecimalRadicesOutput
{
    class Program
    {
        static void Main(string[] args)
        {
            for (int i = 0; i < 42; i++)
            {
                string binary = Convert.ToString(i, 2);
                string octal = Convert.ToString(i, 8);
                string hexadecimal = Convert.ToString(i, 16);
                Console.WriteLine(string.Format("Decimal: {0}, Binary: {1}, Octal: {2}, Hexadecimal: {3}", i, binary, octal, hexadecimal));
            }

            Console.ReadKey();
        }
    }
}

Java: public static void main(String args[]){
   for(int a= 0;a < 33;a++){
      System.out.println(Integer.toBinaryString(a));
      System.out.println(Integer.toOctalString(a));
      System.out.println(Integer.toHexString(a));
      
      

      System.out.printf("%3o %2d %2x\n",a ,a ,a); 
   }
}