WeixiangYan/CodeTransOcean huggingface dataset:
Task: XML_Input






PHP: <?php
$data = '<Students>
  <Student Name="April" Gender="F" DateOfBirth="1989-01-02" />
  <Student Name="Bob" Gender="M"  DateOfBirth="1990-03-04" />
  <Student Name="Chad" Gender="M"  DateOfBirth="1991-05-06" />
  <Student Name="Dave" Gender="M"  DateOfBirth="1992-07-08">
    <Pet Type="dog" Name="Rover" />
  </Student>
  <Student DateOfBirth="1993-09-10" Gender="F" Name="&#x00C9;mily" />
</Students>';
$xml = new XMLReader();
$xml->xml( $data );
while ( $xml->read() )
	if ( XMLREADER::ELEMENT == $xml->nodeType && $xml->localName == 'Student' )
		echo $xml->getAttribute('Name') . "\n";
?>






Ada: with Sax.Readers;
with Input_Sources.Strings;
with Unicode.CES.Utf8;
with My_Reader;

procedure Extract_Students is
   Sample_String : String :=
"<Students>" &
   "<Student Name=""April"" Gender=""F"" DateOfBirth=""1989-01-02"" />" &
   "<Student Name=""Bob"" Gender=""M"" DateOfBirth=""1990-03-04"" />" &
   "<Student Name=""Chad"" Gender=""M"" DateOfBirth=""1991-05-06"" />" &
   "<Student Name=""Dave"" Gender=""M"" DateOfBirth=""1992-07-08"">" &
      "<Pet Type=""dog"" Name=""Rover"" />" &
   "</Student>" &
   "<Student DateOfBirth=""1993-09-10"" Gender=""F"" Name=""&#x00C9;mily"" />" &
"</Students>";
   Reader : My_Reader.Reader;
   Input : Input_Sources.Strings.String_Input;
begin
   Input_Sources.Strings.Open (Sample_String, Unicode.CES.Utf8.Utf8_Encoding, Input);
   My_Reader.Parse (Reader, Input);
   Input_Sources.Strings.Close (Input);
end Extract_Students;
Task: XML_Input








VB: Option Explicit

Const strXml As String = "" & _
"<Students>" & _
    "<Student Name=""April"" Gender=""F"" DateOfBirth=""1989-01-02"" />" & _
    "<Student Name=""Bob"" Gender=""M""  DateOfBirth=""1990-03-04"" />" & _
    "<Student Name=""Chad"" Gender=""M""  DateOfBirth=""1991-05-06"" />" & _
    "<Student Name=""Dave"" Gender=""M""  DateOfBirth=""1992-07-08"">" & _
        "<Pet Type=""dog"" Name=""Rover"" />" & _
    "</Student>" & _
    "<Student DateOfBirth=""1993-09-10"" Gender=""F"" Name=""&#x00C9;mily"" />" & _
"</Students>"

Sub Main_Xml()
Dim MyXml As Object
Dim myNodes, myNode

    With CreateObject("MSXML2.DOMDocument")
        .LoadXML strXml
        Set myNodes = .getElementsByTagName("Student")
    End With
    If Not myNodes Is Nothing Then
        For Each myNode In myNodes
            Debug.Print myNode.getAttribute("Name")
        Next
    End If
    Set myNodes = Nothing
End Sub
Task: Exponentiation order



C#: using System;

namespace exponents
{
    class Program
    {
        static void Main(string[] args)
        {
            
            Console.WriteLine(Math.Pow(Math.Pow(5, 3), 2));
            Console.WriteLine(Math.Pow(5, Math.Pow(3, 2)));
            Console.Read();
        }

    }
}









Ada: with Ada.Text_IO;

procedure Exponentation_Order is
   use Ada.Text_IO;
begin
   
   Put_Line ("(5**3)**2 : " & Natural'((5**3)**2)'Image);
   Put_Line ("5**(3**2) : " & Natural'(5**(3**2))'Image);
end Exponentation_Order;
Task: Exponentiation order

C: #include<stdio.h>
#include<math.h>

int main()
{
    printf("(5 ^ 3) ^ 2 = %.0f",pow(pow(5,3),2));
    printf("\n5 ^ (3 ^ 2) = %.0f",pow(5,pow(3,2)));
	
    return 0;
}











Ada: with Ada.Text_IO;

procedure Exponentation_Order is
   use Ada.Text_IO;
begin
   
   Put_Line ("(5**3)**2 : " & Natural'((5**3)**2)'Image);
   Put_Line ("5**(3**2) : " & Natural'(5**(3**2))'Image);
end Exponentation_Order;
Task: Exponentiation order


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

int main() {
    std::cout << "(5 ^ 3) ^ 2 = " << (uint) pow(pow(5,3), 2) << std::endl;
    std::cout << "5 ^ (3 ^ 2) = "<< (uint) pow(5, (pow(3, 2)));
	
    return EXIT_SUCCESS;
}










Ada: with Ada.Text_IO;

procedure Exponentation_Order is
   use Ada.Text_IO;
begin
   
   Put_Line ("(5**3)**2 : " & Natural'((5**3)**2)'Image);
   Put_Line ("5**(3**2) : " & Natural'(5**(3**2))'Image);
end Exponentation_Order;
Task: Exponentiation order




Go: package main

import "fmt"
import "math"

func main() {
    var a, b, c float64
    a = math.Pow(5, math.Pow(3, 2))
    b = math.Pow(math.Pow(5, 3), 2)
    c = math.Pow(5, math.Pow(3, 2))
    fmt.Printf("5^3^2   = %.0f\n", a)
    fmt.Printf("(5^3)^2 = %.0f\n", b)
    fmt.Printf("5^(3^2) = %.0f\n", c)
}








Ada: with Ada.Text_IO;

procedure Exponentation_Order is
   use Ada.Text_IO;
begin
   
   Put_Line ("(5**3)**2 : " & Natural'((5**3)**2)'Image);
   Put_Line ("5**(3**2) : " & Natural'(5**(3**2))'Image);
end Exponentation_Order;
Task: Exponentiation order







Python: >>> 5**3**2
1953125
>>> (5**3)**2
15625
>>> 5**(3**2)
1953125
>>> 
>>> try: from functools import reduce 
except: pass

>>> reduce(pow, (5, 3, 2))
15625
>>>





Ada: with Ada.Text_IO;

procedure Exponentation_Order is
   use Ada.Text_IO;
begin
   
   Put_Line ("(5**3)**2 : " & Natural'((5**3)**2)'Image);
   Put_Line ("5**(3**2) : " & Natural'(5**(3**2))'Image);
end Exponentation_Order;
Task: Exponentiation order








VB: Public Sub exp()
    Debug.Print "5^3^2", 5 ^ 3 ^ 2
    Debug.Print "(5^3)^2", (5 ^ 3) ^ 2
    Debug.Print "5^(3^2)", 5 ^ (3 ^ 2)
End Sub




Ada: with Ada.Text_IO;

procedure Exponentation_Order is
   use Ada.Text_IO;
begin
   
   Put_Line ("(5**3)**2 : " & Natural'((5**3)**2)'Image);
   Put_Line ("5**(3**2) : " & Natural'(5**(3**2))'Image);
end Exponentation_Order;
Task: Exponentiation order

C: #include<stdio.h>
#include<math.h>

int main()
{
    printf("(5 ^ 3) ^ 2 = %.0f",pow(pow(5,3),2));
    printf("\n5 ^ (3 ^ 2) = %.0f",pow(5,pow(3,2)));
	
    return 0;
}
Task: Exponentiation order



C#: using System;

namespace exponents
{
    class Program
    {
        static void Main(string[] args)
        {
            
            Console.WriteLine(Math.Pow(Math.Pow(5, 3), 2));
            Console.WriteLine(Math.Pow(5, Math.Pow(3, 2)));
            Console.Read();
        }

    }
}
Task: Exponentiation order


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

int main() {
    std::cout << "(5 ^ 3) ^ 2 = " << (uint) pow(pow(5,3), 2) << std::endl;
    std::cout << "5 ^ (3 ^ 2) = "<< (uint) pow(5, (pow(3, 2)));
	
    return EXIT_SUCCESS;
}
Task: Exponentiation order







Python: >>> 5**3**2
1953125
>>> (5**3)**2
15625
>>> 5**(3**2)
1953125
>>> 
>>> try: from functools import reduce 
except: pass

>>> reduce(pow, (5, 3, 2))
15625
>>>
Task: Exponentiation order








VB: OpenConsole()
PrintN("(5^3)^2 = " + Str(Pow(Pow(5, 3), 2)))
PrintN("5^(3^2) = " + Str(Pow(5, (Pow(3, 2)))))
CloseConsole()
Task: Exponentiation order




Go: package main

import "fmt"
import "math"

func main() {
    var a, b, c float64
    a = math.Pow(5, math.Pow(3, 2))
    b = math.Pow(math.Pow(5, 3), 2)
    c = math.Pow(5, math.Pow(3, 2))
    fmt.Printf("5^3^2   = %.0f\n", a)
    fmt.Printf("(5^3)^2 = %.0f\n", b)
    fmt.Printf("5^(3^2) = %.0f\n", c)
}
Task: Exponentiation order



C#: using System;

namespace exponents
{
    class Program
    {
        static void Main(string[] args)
        {
            
            Console.WriteLine(Math.Pow(Math.Pow(5, 3), 2));
            Console.WriteLine(Math.Pow(5, Math.Pow(3, 2)));
            Console.Read();
        }

    }
}








Fortran: write(*, "(a, i0)") "5**3**2   = ", 5**3**2
write(*, "(a, i0)") "(5**3)**2 = ", (5**3)**2
write(*, "(a, i0)") "5**(3**2) = ", 5**(3**2)
Task: Exponentiation order


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

int main() {
    std::cout << "(5 ^ 3) ^ 2 = " << (uint) pow(pow(5,3), 2) << std::endl;
    std::cout << "5 ^ (3 ^ 2) = "<< (uint) pow(5, (pow(3, 2)));
	
    return EXIT_SUCCESS;
}









Fortran: write(*, "(a, i0)") "5**3**2   = ", 5**3**2
write(*, "(a, i0)") "(5**3)**2 = ", (5**3)**2
write(*, "(a, i0)") "5**(3**2) = ", 5**(3**2)
Task: Exponentiation order

C: #include<stdio.h>
#include<math.h>

int main()
{
    printf("(5 ^ 3) ^ 2 = %.0f",pow(pow(5,3),2));
    printf("\n5 ^ (3 ^ 2) = %.0f",pow(5,pow(3,2)));
	
    return 0;
}










Fortran: write(*, "(a, i0)") "5**3**2   = ", 5**3**2
write(*, "(a, i0)") "(5**3)**2 = ", (5**3)**2
write(*, "(a, i0)") "5**(3**2) = ", 5**(3**2)
Task: Exponentiation order




Go: package main

import "fmt"
import "math"

func main() {
    var a, b, c float64
    a = math.Pow(5, math.Pow(3, 2))
    b = math.Pow(math.Pow(5, 3), 2)
    c = math.Pow(5, math.Pow(3, 2))
    fmt.Printf("5^3^2   = %.0f\n", a)
    fmt.Printf("(5^3)^2 = %.0f\n", b)
    fmt.Printf("5^(3^2) = %.0f\n", c)
}







Fortran: write(*, "(a, i0)") "5**3**2   = ", 5**3**2
write(*, "(a, i0)") "(5**3)**2 = ", (5**3)**2
write(*, "(a, i0)") "5**(3**2) = ", 5**(3**2)
Task: Exponentiation order







Python: >>> 5**3**2
1953125
>>> (5**3)**2
15625
>>> 5**(3**2)
1953125
>>> 
>>> try: from functools import reduce 
except: pass

>>> reduce(pow, (5, 3, 2))
15625
>>>




Fortran: write(*, "(a, i0)") "5**3**2   = ", 5**3**2
write(*, "(a, i0)") "(5**3)**2 = ", (5**3)**2
write(*, "(a, i0)") "5**(3**2) = ", 5**(3**2)
Task: Exponentiation order








VB: OpenConsole()
PrintN("(5^3)^2 = " + Str(Pow(Pow(5, 3), 2)))
PrintN("5^(3^2) = " + Str(Pow(5, (Pow(3, 2)))))
CloseConsole()



Fortran: write(*, "(a, i0)") "5**3**2   = ", 5**3**2
write(*, "(a, i0)") "(5**3)**2 = ", (5**3)**2
write(*, "(a, i0)") "5**(3**2) = ", 5**(3**2)
Task: Exponentiation order








VB: Public Sub exp()
    Debug.Print "5^3^2", 5 ^ 3 ^ 2
    Debug.Print "(5^3)^2", (5 ^ 3) ^ 2
    Debug.Print "5^(3^2)", 5 ^ (3 ^ 2)
End Sub
Task: Loops_For with a specified step



C#: using System;
 
class Program {
    static void Main(string[] args) {    
        for (int i = 2; i <= 8; i+= 2) {        
            Console.Write("{0}, ", i);
        }

        Console.WriteLine("who do we appreciate?");
    }
}









Ada: with Loopers;
use Loopers;


procedure For_Main is
begin
        Looper_1;
        Looper_2;
        Looper_3;
end For_Main;


package Loopers is
        procedure Looper_1;
        procedure Looper_2;
        procedure Looper_3;
end Loopers;

with Ada.Text_IO, Ada.Integer_Text_IO;
use Ada.Text_IO, Ada.Integer_Text_IO;

package body Loopers is
        procedure Looper_1 is
                Values : array(1..5) of Integer := (2,4,6,8,10);
        begin
                for I in Values'Range loop
                        Put(Values(I),0);
                        if I = Values'Last then
                                Put_Line(".");
                        else
                                Put(",");
                        end if;
                end loop;
        end Looper_1;

        procedure Looper_2 is
                E : Integer := 5;
        begin
                for I in 1..E loop
                        Put(I*2,0);
                        if I = E then
                                Put_Line(".");
                        else
                                Put(",");
                        end if;
                end loop;
        end Looper_2;

        procedure Looper_3 is
                Values : array(1..10) of Integer := (1,2,3,4,5,6,7,8,9,10);
                Indices : array(1..5) of Integer := (2,4,6,8,10);
        begin
                for I in Indices'Range loop
                        Put(Values(Indices(I)),0);
                        if I = Indices'Last then
                                Put_Line(".");
                        else
                                Put(",");
                        end if;
                end loop;
        end Looper_3;

end Loopers;
Task: Loops_For with a specified step

C: int i;
for(i = 1; i < 10; i += 2)
  printf("%d\n", i);











Ada: with Loopers;
use Loopers;


procedure For_Main is
begin
        Looper_1;
        Looper_2;
        Looper_3;
end For_Main;


package Loopers is
        procedure Looper_1;
        procedure Looper_2;
        procedure Looper_3;
end Loopers;

with Ada.Text_IO, Ada.Integer_Text_IO;
use Ada.Text_IO, Ada.Integer_Text_IO;

package body Loopers is
        procedure Looper_1 is
                Values : array(1..5) of Integer := (2,4,6,8,10);
        begin
                for I in Values'Range loop
                        Put(Values(I),0);
                        if I = Values'Last then
                                Put_Line(".");
                        else
                                Put(",");
                        end if;
                end loop;
        end Looper_1;

        procedure Looper_2 is
                E : Integer := 5;
        begin
                for I in 1..E loop
                        Put(I*2,0);
                        if I = E then
                                Put_Line(".");
                        else
                                Put(",");
                        end if;
                end loop;
        end Looper_2;

        procedure Looper_3 is
                Values : array(1..10) of Integer := (1,2,3,4,5,6,7,8,9,10);
                Indices : array(1..5) of Integer := (2,4,6,8,10);
        begin
                for I in Indices'Range loop
                        Put(Values(Indices(I)),0);
                        if I = Indices'Last then
                                Put_Line(".");
                        else
                                Put(",");
                        end if;
                end loop;
        end Looper_3;

end Loopers;
Task: Loops_For with a specified step


C++: for (int i = 1; i < 10; i += 2)
  std::cout << i << std::endl;










Ada: with Loopers;
use Loopers;


procedure For_Main is
begin
        Looper_1;
        Looper_2;
        Looper_3;
end For_Main;


package Loopers is
        procedure Looper_1;
        procedure Looper_2;
        procedure Looper_3;
end Loopers;

with Ada.Text_IO, Ada.Integer_Text_IO;
use Ada.Text_IO, Ada.Integer_Text_IO;

package body Loopers is
        procedure Looper_1 is
                Values : array(1..5) of Integer := (2,4,6,8,10);
        begin
                for I in Values'Range loop
                        Put(Values(I),0);
                        if I = Values'Last then
                                Put_Line(".");
                        else
                                Put(",");
                        end if;
                end loop;
        end Looper_1;

        procedure Looper_2 is
                E : Integer := 5;
        begin
                for I in 1..E loop
                        Put(I*2,0);
                        if I = E then
                                Put_Line(".");
                        else
                                Put(",");
                        end if;
                end loop;
        end Looper_2;

        procedure Looper_3 is
                Values : array(1..10) of Integer := (1,2,3,4,5,6,7,8,9,10);
                Indices : array(1..5) of Integer := (2,4,6,8,10);
        begin
                for I in Indices'Range loop
                        Put(Values(Indices(I)),0);
                        if I = Indices'Last then
                                Put_Line(".");
                        else
                                Put(",");
                        end if;
                end loop;
        end Looper_3;

end Loopers;
Task: Loops_For with a specified step




Go: for i := 1; i < 10; i += 2 {
  fmt.Printf("%d\n", i)
}








Ada: with Loopers;
use Loopers;


procedure For_Main is
begin
        Looper_1;
        Looper_2;
        Looper_3;
end For_Main;


package Loopers is
        procedure Looper_1;
        procedure Looper_2;
        procedure Looper_3;
end Loopers;

with Ada.Text_IO, Ada.Integer_Text_IO;
use Ada.Text_IO, Ada.Integer_Text_IO;

package body Loopers is
        procedure Looper_1 is
                Values : array(1..5) of Integer := (2,4,6,8,10);
        begin
                for I in Values'Range loop
                        Put(Values(I),0);
                        if I = Values'Last then
                                Put_Line(".");
                        else
                                Put(",");
                        end if;
                end loop;
        end Looper_1;

        procedure Looper_2 is
                E : Integer := 5;
        begin
                for I in 1..E loop
                        Put(I*2,0);
                        if I = E then
                                Put_Line(".");
                        else
                                Put(",");
                        end if;
                end loop;
        end Looper_2;

        procedure Looper_3 is
                Values : array(1..10) of Integer := (1,2,3,4,5,6,7,8,9,10);
                Indices : array(1..5) of Integer := (2,4,6,8,10);
        begin
                for I in Indices'Range loop
                        Put(Values(Indices(I)),0);
                        if I = Indices'Last then
                                Put_Line(".");
                        else
                                Put(",");
                        end if;
                end loop;
        end Looper_3;

end Loopers;
Task: Loops_For with a specified step





Java: for(int i = 2; i <= 8;i += 2){
   System.out.print(i + ", ");
}
System.out.println("who do we appreciate?");







Ada: with Loopers;
use Loopers;


procedure For_Main is
begin
        Looper_1;
        Looper_2;
        Looper_3;
end For_Main;


package Loopers is
        procedure Looper_1;
        procedure Looper_2;
        procedure Looper_3;
end Loopers;

with Ada.Text_IO, Ada.Integer_Text_IO;
use Ada.Text_IO, Ada.Integer_Text_IO;

package body Loopers is
        procedure Looper_1 is
                Values : array(1..5) of Integer := (2,4,6,8,10);
        begin
                for I in Values'Range loop
                        Put(Values(I),0);
                        if I = Values'Last then
                                Put_Line(".");
                        else
                                Put(",");
                        end if;
                end loop;
        end Looper_1;

        procedure Looper_2 is
                E : Integer := 5;
        begin
                for I in 1..E loop
                        Put(I*2,0);
                        if I = E then
                                Put_Line(".");
                        else
                                Put(",");
                        end if;
                end loop;
        end Looper_2;

        procedure Looper_3 is
                Values : array(1..10) of Integer := (1,2,3,4,5,6,7,8,9,10);
                Indices : array(1..5) of Integer := (2,4,6,8,10);
        begin
                for I in Indices'Range loop
                        Put(Values(Indices(I)),0);
                        if I = Indices'Last then
                                Put_Line(".");
                        else
                                Put(",");
                        end if;
                end loop;
        end Looper_3;

end Loopers;
Task: Loops_For with a specified step







Python: for i in xrange(2, 9, 2):
    print "%d," % i,
print "who do we appreciate?"





Ada: with Loopers;
use Loopers;


procedure For_Main is
begin
        Looper_1;
        Looper_2;
        Looper_3;
end For_Main;


package Loopers is
        procedure Looper_1;
        procedure Looper_2;
        procedure Looper_3;
end Loopers;

with Ada.Text_IO, Ada.Integer_Text_IO;
use Ada.Text_IO, Ada.Integer_Text_IO;

package body Loopers is
        procedure Looper_1 is
                Values : array(1..5) of Integer := (2,4,6,8,10);
        begin
                for I in Values'Range loop
                        Put(Values(I),0);
                        if I = Values'Last then
                                Put_Line(".");
                        else
                                Put(",");
                        end if;
                end loop;
        end Looper_1;

        procedure Looper_2 is
                E : Integer := 5;
        begin
                for I in 1..E loop
                        Put(I*2,0);
                        if I = E then
                                Put_Line(".");
                        else
                                Put(",");
                        end if;
                end loop;
        end Looper_2;

        procedure Looper_3 is
                Values : array(1..10) of Integer := (1,2,3,4,5,6,7,8,9,10);
                Indices : array(1..5) of Integer := (2,4,6,8,10);
        begin
                for I in Indices'Range loop
                        Put(Values(Indices(I)),0);
                        if I = Indices'Last then
                                Put_Line(".");
                        else
                                Put(",");
                        end if;
                end loop;
        end Looper_3;

end Loopers;
Task: Loops_For with a specified step








VB: Sub MyLoop()
    For i = 2 To 8 Step 2
        Debug.Print i;
    Next i
    Debug.Print
End Sub




Ada: with Loopers;
use Loopers;


procedure For_Main is
begin
        Looper_1;
        Looper_2;
        Looper_3;
end For_Main;


package Loopers is
        procedure Looper_1;
        procedure Looper_2;
        procedure Looper_3;
end Loopers;

with Ada.Text_IO, Ada.Integer_Text_IO;
use Ada.Text_IO, Ada.Integer_Text_IO;

package body Loopers is
        procedure Looper_1 is
                Values : array(1..5) of Integer := (2,4,6,8,10);
        begin
                for I in Values'Range loop
                        Put(Values(I),0);
                        if I = Values'Last then
                                Put_Line(".");
                        else
                                Put(",");
                        end if;
                end loop;
        end Looper_1;

        procedure Looper_2 is
                E : Integer := 5;
        begin
                for I in 1..E loop
                        Put(I*2,0);
                        if I = E then
                                Put_Line(".");
                        else
                                Put(",");
                        end if;
                end loop;
        end Looper_2;

        procedure Looper_3 is
                Values : array(1..10) of Integer := (1,2,3,4,5,6,7,8,9,10);
                Indices : array(1..5) of Integer := (2,4,6,8,10);
        begin
                for I in Indices'Range loop
                        Put(Values(Indices(I)),0);
                        if I = Indices'Last then
                                Put_Line(".");
                        else
                                Put(",");
                        end if;
                end loop;
        end Looper_3;

end Loopers;
Task: Loops_For with a specified step

C: int i;
for(i = 1; i < 10; i += 2)
  printf("%d\n", i);
Task: Loops_For with a specified step



C#: using System;
 
class Program {
    static void Main(string[] args) {    
        for (int i = 2; i <= 8; i+= 2) {        
            Console.Write("{0}, ", i);
        }

        Console.WriteLine("who do we appreciate?");
    }
}
Task: Loops_For with a specified step


C++: for (int i = 1; i < 10; i += 2)
  std::cout << i << std::endl;
Task: Loops_For with a specified step





Java: for(int i = 2; i <= 8;i += 2){
   System.out.print(i + ", ");
}
System.out.println("who do we appreciate?");
Task: Loops_For with a specified step







Python: for i in xrange(2, 9, 2):
    print "%d," % i,
print "who do we appreciate?"
Task: Loops_For with a specified step








VB: Sub MyLoop()
    For i = 2 To 8 Step 2
        Debug.Print i;
    Next i
    Debug.Print
End Sub
Task: Loops_For with a specified step




Go: for i := 1; i < 10; i += 2 {
  fmt.Printf("%d\n", i)
}
Task: Loops_For with a specified step



C#: using System;
 
class Program {
    static void Main(string[] args) {    
        for (int i = 2; i <= 8; i+= 2) {        
            Console.Write("{0}, ", i);
        }

        Console.WriteLine("who do we appreciate?");
    }
}








Fortran: do i = 1,10,2
   print *, i
end do
Task: Loops_For with a specified step


C++: for (int i = 1; i < 10; i += 2)
  std::cout << i << std::endl;









Fortran: do i = 1,10,2
   print *, i
end do
Task: Loops_For with a specified step

C: int i;
for(i = 1; i < 10; i += 2)
  printf("%d\n", i);










Fortran: do i = 1,10,2
   print *, i
end do
Task: Loops_For with a specified step





Java: for(int i = 2; i <= 8;i += 2){
   System.out.print(i + ", ");
}
System.out.println("who do we appreciate?");






Fortran: do i = 1,10,2
   print *, i
end do