WeixiangYan/CodeTransOcean huggingface dataset:
Task: Day of the week


C++: #include <boost/date_time/gregorian/gregorian.hpp>
#include <iostream>

int main( ) {
   using namespace boost::gregorian ;

   std::cout
      << "Yuletide holidays must be allowed in the following years:\n" ;
   for ( int i = 2008 ; i < 2121 ; i++ ) {
      greg_year gy = i ;
      date d  ( gy, Dec , 25 ) ;
      if ( d.day_of_week( ) == Sunday ) {
	 std::cout << i << std::endl ;
      }
   }
   std::cout << "\n" ;
   return 0 ;
}









Fortran: PROGRAM YULETIDE
 
IMPLICIT NONE
  
INTEGER :: day, year
 
WRITE(*, "(A)", ADVANCE="NO") "25th of December is a Sunday in"
DO year = 2008, 2121
   day = Day_of_week(25, 12, year)
   IF (day == 1) WRITE(*, "(I5)", ADVANCE="NO") year
END DO
  
CONTAINS
 
FUNCTION Day_of_week(d, m, y)
   INTEGER :: Day_of_week, j, k, mm, yy
   INTEGER, INTENT(IN) :: d, m, y
  
   mm=m
   yy=y
   IF(mm.le.2) THEN
      mm=mm+12
      yy=yy-1
   END IF
   j = yy / 100
   k = MOD(yy, 100)
   Day_of_week = MOD(d + ((mm+1)*26)/10 + k + k/4 + j/4 + 5*j, 7)
END FUNCTION Day_of_week
  
END PROGRAM YULETIDE
Task: Day of the week

C: #include <stdio.h>


int wday(int year, int month, int day)
{
	int adjustment, mm, yy;

	adjustment = (14 - month) / 12;
	mm = month + 12 * adjustment - 2;
	yy = year - adjustment;
	return (day + (13 * mm - 1) / 5 +
		yy + yy / 4 - yy / 100 + yy / 400) % 7;
}

int main()
{
	int y;

	for (y = 2008; y <= 2121; y++) {
		if (wday(y, 12, 25) == 0) printf("%04d-12-25\n", y);
	}

	return 0;
}










Fortran: PROGRAM YULETIDE
 
IMPLICIT NONE
  
INTEGER :: day, year
 
WRITE(*, "(A)", ADVANCE="NO") "25th of December is a Sunday in"
DO year = 2008, 2121
   day = Day_of_week(25, 12, year)
   IF (day == 1) WRITE(*, "(I5)", ADVANCE="NO") year
END DO
  
CONTAINS
 
FUNCTION Day_of_week(d, m, y)
   INTEGER :: Day_of_week, j, k, mm, yy
   INTEGER, INTENT(IN) :: d, m, y
  
   mm=m
   yy=y
   IF(mm.le.2) THEN
      mm=mm+12
      yy=yy-1
   END IF
   j = yy / 100
   k = MOD(yy, 100)
   Day_of_week = MOD(d + ((mm+1)*26)/10 + k + k/4 + j/4 + 5*j, 7)
END FUNCTION Day_of_week
  
END PROGRAM YULETIDE
Task: Day of the week





Java: import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;

public class Yuletide{
	public static void main(String[] args) {
		for(int i = 2008;i<=2121;i++){
			Calendar cal = new GregorianCalendar(i, Calendar.DECEMBER,
					25);
			if(cal.get(Calendar.DAY_OF_WEEK)==Calendar.SUNDAY){
				System.out.println(cal.getTime());
			}
		}
	}
}






Fortran: PROGRAM YULETIDE
 
IMPLICIT NONE
  
INTEGER :: day, year
 
WRITE(*, "(A)", ADVANCE="NO") "25th of December is a Sunday in"
DO year = 2008, 2121
   day = Day_of_week(25, 12, year)
   IF (day == 1) WRITE(*, "(I5)", ADVANCE="NO") year
END DO
  
CONTAINS
 
FUNCTION Day_of_week(d, m, y)
   INTEGER :: Day_of_week, j, k, mm, yy
   INTEGER, INTENT(IN) :: d, m, y
  
   mm=m
   yy=y
   IF(mm.le.2) THEN
      mm=mm+12
      yy=yy-1
   END IF
   j = yy / 100
   k = MOD(yy, 100)
   Day_of_week = MOD(d + ((mm+1)*26)/10 + k + k/4 + j/4 + 5*j, 7)
END FUNCTION Day_of_week
  
END PROGRAM YULETIDE
Task: Day of the week







Python: from calendar import weekday, SUNDAY

[year for year in range(2008, 2122) if weekday(year, 12, 25) == SUNDAY]




Fortran: PROGRAM YULETIDE
 
IMPLICIT NONE
  
INTEGER :: day, year
 
WRITE(*, "(A)", ADVANCE="NO") "25th of December is a Sunday in"
DO year = 2008, 2121
   day = Day_of_week(25, 12, year)
   IF (day == 1) WRITE(*, "(I5)", ADVANCE="NO") year
END DO
  
CONTAINS
 
FUNCTION Day_of_week(d, m, y)
   INTEGER :: Day_of_week, j, k, mm, yy
   INTEGER, INTENT(IN) :: d, m, y
  
   mm=m
   yy=y
   IF(mm.le.2) THEN
      mm=mm+12
      yy=yy-1
   END IF
   j = yy / 100
   k = MOD(yy, 100)
   Day_of_week = MOD(d + ((mm+1)*26)/10 + k + k/4 + j/4 + 5*j, 7)
END FUNCTION Day_of_week
  
END PROGRAM YULETIDE
Task: Day of the week








VB: Option Explicit

Sub MainDayOfTheWeek()
    Debug.Print "Xmas will be a Sunday in : " & XmasSunday(2008, 2121)
End Sub

Private Function XmasSunday(firstYear As Integer, lastYear As Integer) As String
Dim i As Integer, temp$
    For i = firstYear To lastYear
        If Weekday(CDate("25/12/" & i)) = vbSunday Then temp = temp & ", " & i
    Next
    XmasSunday = Mid(temp, 2)
End Function



Fortran: PROGRAM YULETIDE
 
IMPLICIT NONE
  
INTEGER :: day, year
 
WRITE(*, "(A)", ADVANCE="NO") "25th of December is a Sunday in"
DO year = 2008, 2121
   day = Day_of_week(25, 12, year)
   IF (day == 1) WRITE(*, "(I5)", ADVANCE="NO") year
END DO
  
CONTAINS
 
FUNCTION Day_of_week(d, m, y)
   INTEGER :: Day_of_week, j, k, mm, yy
   INTEGER, INTENT(IN) :: d, m, y
  
   mm=m
   yy=y
   IF(mm.le.2) THEN
      mm=mm+12
      yy=yy-1
   END IF
   j = yy / 100
   k = MOD(yy, 100)
   Day_of_week = MOD(d + ((mm+1)*26)/10 + k + k/4 + j/4 + 5*j, 7)
END FUNCTION Day_of_week
  
END PROGRAM YULETIDE
Task: Day of the week






PHP: <?php
for($i=2008; $i<2121; $i++)
{
  $datetime = new DateTime("$i-12-25 00:00:00");
  if ( $datetime->format("w") == 0 )
  {
     echo "25 Dec $i is Sunday\n";
  }
}
?>





Fortran: PROGRAM YULETIDE
 
IMPLICIT NONE
  
INTEGER :: day, year
 
WRITE(*, "(A)", ADVANCE="NO") "25th of December is a Sunday in"
DO year = 2008, 2121
   day = Day_of_week(25, 12, year)
   IF (day == 1) WRITE(*, "(I5)", ADVANCE="NO") year
END DO
  
CONTAINS
 
FUNCTION Day_of_week(d, m, y)
   INTEGER :: Day_of_week, j, k, mm, yy
   INTEGER, INTENT(IN) :: d, m, y
  
   mm=m
   yy=y
   IF(mm.le.2) THEN
      mm=mm+12
      yy=yy-1
   END IF
   j = yy / 100
   k = MOD(yy, 100)
   Day_of_week = MOD(d + ((mm+1)*26)/10 + k + k/4 + j/4 + 5*j, 7)
END FUNCTION Day_of_week
  
END PROGRAM YULETIDE
Task: Day of the week

C: #include <stdio.h>


int wday(int year, int month, int day)
{
	int adjustment, mm, yy;

	adjustment = (14 - month) / 12;
	mm = month + 12 * adjustment - 2;
	yy = year - adjustment;
	return (day + (13 * mm - 1) / 5 +
		yy + yy / 4 - yy / 100 + yy / 400) % 7;
}

int main()
{
	int y;

	for (y = 2008; y <= 2121; y++) {
		if (wday(y, 12, 25) == 0) printf("%04d-12-25\n", y);
	}

	return 0;
}









COBOL:        program-id. dec25.
       data division.
       working-storage section.
       1 work-date.
        2 yr pic 9(4) value 2008.
        2 mo-da pic 9(4) value 1225. 
       1 wk-date redefines work-date pic 9(8).
       1 binary.
        2 int-date pic 9(8).
        2 dow pic 9(4).
       procedure division.
           perform varying yr from 2008 by 1
           until yr > 2121
               compute int-date = function integer-of-date (wk-date)
               compute dow = function mod ((int-date - 1) 7) + 1
               if dow = 7  
                   display yr
               end-if
           end-perform
           stop run
           .
       end program dec25.
Task: Day of the week



C#: using System;

class Program
{
    static void Main(string[] args)
    {
        for (int i = 2008; i <= 2121; i++)
        {
            DateTime date = new DateTime(i, 12, 25);
            if (date.DayOfWeek == DayOfWeek.Sunday)
            {
                Console.WriteLine(date.ToString("dd MMM yyyy"));
            }
        }
    }
}







COBOL:        program-id. dec25.
       data division.
       working-storage section.
       1 work-date.
        2 yr pic 9(4) value 2008.
        2 mo-da pic 9(4) value 1225. 
       1 wk-date redefines work-date pic 9(8).
       1 binary.
        2 int-date pic 9(8).
        2 dow pic 9(4).
       procedure division.
           perform varying yr from 2008 by 1
           until yr > 2121
               compute int-date = function integer-of-date (wk-date)
               compute dow = function mod ((int-date - 1) 7) + 1
               if dow = 7  
                   display yr
               end-if
           end-perform
           stop run
           .
       end program dec25.
Task: Day of the week


C++: #include <boost/date_time/gregorian/gregorian.hpp>
#include <iostream>

int main( ) {
   using namespace boost::gregorian ;

   std::cout
      << "Yuletide holidays must be allowed in the following years:\n" ;
   for ( int i = 2008 ; i < 2121 ; i++ ) {
      greg_year gy = i ;
      date d  ( gy, Dec , 25 ) ;
      if ( d.day_of_week( ) == Sunday ) {
	 std::cout << i << std::endl ;
      }
   }
   std::cout << "\n" ;
   return 0 ;
}








COBOL:        program-id. dec25.
       data division.
       working-storage section.
       1 work-date.
        2 yr pic 9(4) value 2008.
        2 mo-da pic 9(4) value 1225. 
       1 wk-date redefines work-date pic 9(8).
       1 binary.
        2 int-date pic 9(8).
        2 dow pic 9(4).
       procedure division.
           perform varying yr from 2008 by 1
           until yr > 2121
               compute int-date = function integer-of-date (wk-date)
               compute dow = function mod ((int-date - 1) 7) + 1
               if dow = 7  
                   display yr
               end-if
           end-perform
           stop run
           .
       end program dec25.
Task: Day of the week





Java: import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;

public class Yuletide{
	public static void main(String[] args) {
		for(int i = 2008;i<=2121;i++){
			Calendar cal = new GregorianCalendar(i, Calendar.DECEMBER,
					25);
			if(cal.get(Calendar.DAY_OF_WEEK)==Calendar.SUNDAY){
				System.out.println(cal.getTime());
			}
		}
	}
}





COBOL:        program-id. dec25.
       data division.
       working-storage section.
       1 work-date.
        2 yr pic 9(4) value 2008.
        2 mo-da pic 9(4) value 1225. 
       1 wk-date redefines work-date pic 9(8).
       1 binary.
        2 int-date pic 9(8).
        2 dow pic 9(4).
       procedure division.
           perform varying yr from 2008 by 1
           until yr > 2121
               compute int-date = function integer-of-date (wk-date)
               compute dow = function mod ((int-date - 1) 7) + 1
               if dow = 7  
                   display yr
               end-if
           end-perform
           stop run
           .
       end program dec25.
Task: Day of the week







Python: from calendar import weekday, SUNDAY

[year for year in range(2008, 2122) if weekday(year, 12, 25) == SUNDAY]



COBOL:        program-id. dec25.
       data division.
       working-storage section.
       1 work-date.
        2 yr pic 9(4) value 2008.
        2 mo-da pic 9(4) value 1225. 
       1 wk-date redefines work-date pic 9(8).
       1 binary.
        2 int-date pic 9(8).
        2 dow pic 9(4).
       procedure division.
           perform varying yr from 2008 by 1
           until yr > 2121
               compute int-date = function integer-of-date (wk-date)
               compute dow = function mod ((int-date - 1) 7) + 1
               if dow = 7  
                   display yr
               end-if
           end-perform
           stop run
           .
       end program dec25.
Task: Day of the week








VB: Option Explicit

Sub MainDayOfTheWeek()
    Debug.Print "Xmas will be a Sunday in : " & XmasSunday(2008, 2121)
End Sub

Private Function XmasSunday(firstYear As Integer, lastYear As Integer) As String
Dim i As Integer, temp$
    For i = firstYear To lastYear
        If Weekday(CDate("25/12/" & i)) = vbSunday Then temp = temp & ", " & i
    Next
    XmasSunday = Mid(temp, 2)
End Function


COBOL:        program-id. dec25.
       data division.
       working-storage section.
       1 work-date.
        2 yr pic 9(4) value 2008.
        2 mo-da pic 9(4) value 1225. 
       1 wk-date redefines work-date pic 9(8).
       1 binary.
        2 int-date pic 9(8).
        2 dow pic 9(4).
       procedure division.
           perform varying yr from 2008 by 1
           until yr > 2121
               compute int-date = function integer-of-date (wk-date)
               compute dow = function mod ((int-date - 1) 7) + 1
               if dow = 7  
                   display yr
               end-if
           end-perform
           stop run
           .
       end program dec25.
Task: Day of the week




Go: package main

import "fmt"
import "time"

func main() {
    for year := 2008; year <= 2121; year++ {
        if time.Date(year, 12, 25, 0, 0, 0, 0, time.UTC).Weekday() ==
            time.Sunday {
            fmt.Printf("25 December %d is Sunday\n", year)
        }
    }
}






COBOL:        program-id. dec25.
       data division.
       working-storage section.
       1 work-date.
        2 yr pic 9(4) value 2008.
        2 mo-da pic 9(4) value 1225. 
       1 wk-date redefines work-date pic 9(8).
       1 binary.
        2 int-date pic 9(8).
        2 dow pic 9(4).
       procedure division.
           perform varying yr from 2008 by 1
           until yr > 2121
               compute int-date = function integer-of-date (wk-date)
               compute dow = function mod ((int-date - 1) 7) + 1
               if dow = 7  
                   display yr
               end-if
           end-perform
           stop run
           .
       end program dec25.
Task: Day of the week






PHP: <?php
for($i=2008; $i<2121; $i++)
{
  $datetime = new DateTime("$i-12-25 00:00:00");
  if ( $datetime->format("w") == 0 )
  {
     echo "25 Dec $i is Sunday\n";
  }
}
?>
Task: Day of the week






PHP: <?php
for($i=2008; $i<2121; $i++)
{
  $datetime = new DateTime("$i-12-25 00:00:00");
  if ( $datetime->format("w") == 0 )
  {
     echo "25 Dec $i is Sunday\n";
  }
}
?>






Ada: with Ada.Calendar.Formatting;  use Ada.Calendar.Formatting;
with Ada.Text_IO;              use Ada.Text_IO;
 
procedure Yuletide is
begin
   for Year in 2008..2121 loop
      if Day_Of_Week (Time_Of (Year, 12, 25)) = Sunday then
         Put_Line (Image (Time_Of (Year, 12, 25)));
      end if;
   end loop;
end Yuletide;
Task: Day of the week






PHP: <?php
for($i=2008; $i<2121; $i++)
{
  $datetime = new DateTime("$i-12-25 00:00:00");
  if ( $datetime->format("w") == 0 )
  {
     echo "25 Dec $i is Sunday\n";
  }
}
?>




COBOL:        program-id. dec25.
       data division.
       working-storage section.
       1 work-date.
        2 yr pic 9(4) value 2008.
        2 mo-da pic 9(4) value 1225. 
       1 wk-date redefines work-date pic 9(8).
       1 binary.
        2 int-date pic 9(8).
        2 dow pic 9(4).
       procedure division.
           perform varying yr from 2008 by 1
           until yr > 2121
               compute int-date = function integer-of-date (wk-date)
               compute dow = function mod ((int-date - 1) 7) + 1
               if dow = 7  
                   display yr
               end-if
           end-perform
           stop run
           .
       end program dec25.
Task: The Name Game



C#: using System;
using System.Collections.Generic;
using System.Text;

namespace TheNameGame {
    class Program {
        static void PrintVerse(string name) {
            StringBuilder sb = new StringBuilder(name.ToLower());
            sb[0] = Char.ToUpper(sb[0]);
            string x = sb.ToString();
            string y = "AEIOU".IndexOf(x[0]) > -1 ? x.ToLower() : x.Substring(1);
            string b = "b" + y;
            string f = "f" + y;
            string m = "m" + y;
            switch (x[0]) {
                case 'B':
                    b = y;
                    break;
                case 'F':
                    f = y;
                    break;
                case 'M':
                    m = y;
                    break;
            }
            Console.WriteLine("{0}, {0}, bo-{1}", x, b);
            Console.WriteLine("Banana-fana fo-{0}", f);
            Console.WriteLine("Fee-fi-mo-{0}", m);
            Console.WriteLine("{0}!", x);
            Console.WriteLine();
        }

        static void Main(string[] args) {
            List<string> nameList = new List<string>() { "Gary", "Earl", "Billy", "Felix", "Mary", "Steve" };
            nameList.ForEach(PrintVerse);
        }
    }
}









Ada: with Ada.Characters.Handling;
with Ada.Strings.Unbounded;
with Ada.Text_IO;

procedure The_Name_Game
is
   package ACH renames Ada.Characters.Handling;
   package ASU renames Ada.Strings.Unbounded;
   function "+"(input : in String) return ASU.Unbounded_String renames ASU.To_Unbounded_String;
   function "+"(input : in ASU.Unbounded_String) return String renames ASU.To_String;
   
   function Normalize_Case(input : in String) return String is
   begin
      return ACH.To_Upper(input(input'First))
        & ACH.To_Lower(input(input'First + 1 .. input'Last));
   end Normalize_Case;

   function Transform(input : in String; letter : in Character) return String is
   begin
      case input(input'First) is
         when 'A' | 'E' | 'I' | 'O' | 'U' =>
            return letter & ACH.To_Lower(input);
         when others =>
            if ACH.To_Lower(input(input'First)) = letter then
               return input(input'First + 1 .. input'Last);
            else
               return letter & input(input'First + 1 .. input'Last);
            end if;
      end case;
   end Transform;
   
   procedure Lyrics(name : in String)
   is
      normalized : constant String := Normalize_Case(name);
   begin
      Ada.Text_IO.Put_Line(normalized & ", " & normalized & ", bo-" & Transform(normalized, 'b'));
      Ada.Text_IO.Put_Line("Banana-fana, fo-" & Transform(normalized, 'f'));
      Ada.Text_IO.Put_Line("fi-fee-mo-" & Transform(normalized, 'm'));
      Ada.Text_IO.Put_Line(normalized & '!');
      Ada.Text_IO.New_Line;
   end Lyrics;

   names : constant array(1 .. 5) of ASU.Unbounded_String :=
     (+"Gary",
      +"EARL",
      +"billy",
      +"FeLiX",
      +"Mary");
begin
   for name of names loop
      Lyrics(+name);
   end loop;
end The_Name_Game;
Task: The Name Game

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

void print_verse(const char *name) {
    char *x, *y; 
    int b = 1, f = 1, m = 1, i = 1;

    
    x = strdup(name);     
    x[0] = toupper(x[0]);
    for (; x[i]; ++i) x[i] = tolower(x[i]);
   
    if (strchr("AEIOU", x[0])) {
        y = strdup(x);
        y[0] = tolower(y[0]); 
    }
    else {
        y = x + 1;
    }

    switch(x[0]) {
        case 'B': b = 0; break;
        case 'F': f = 0; break;
        case 'M': m = 0; break;
        default : break;
    }
      
    printf("%s, %s, bo-%s%s\n", x, x, (b) ? "b" : "", y);
    printf("Banana-fana fo-%s%s\n", (f) ? "f" : "", y);
    printf("Fee-fi-mo-%s%s\n", (m) ? "m" : "", y);
    printf("%s!\n\n", x);
}

int main() {
    int i;
    const char *names[6] = {"gARY", "Earl", "Billy", "Felix", "Mary", "sHIRley"};
    for (i = 0; i < 6; ++i) print_verse(names[i]);
    return 0;
}











Ada: with Ada.Characters.Handling;
with Ada.Strings.Unbounded;
with Ada.Text_IO;

procedure The_Name_Game
is
   package ACH renames Ada.Characters.Handling;
   package ASU renames Ada.Strings.Unbounded;
   function "+"(input : in String) return ASU.Unbounded_String renames ASU.To_Unbounded_String;
   function "+"(input : in ASU.Unbounded_String) return String renames ASU.To_String;
   
   function Normalize_Case(input : in String) return String is
   begin
      return ACH.To_Upper(input(input'First))
        & ACH.To_Lower(input(input'First + 1 .. input'Last));
   end Normalize_Case;

   function Transform(input : in String; letter : in Character) return String is
   begin
      case input(input'First) is
         when 'A' | 'E' | 'I' | 'O' | 'U' =>
            return letter & ACH.To_Lower(input);
         when others =>
            if ACH.To_Lower(input(input'First)) = letter then
               return input(input'First + 1 .. input'Last);
            else
               return letter & input(input'First + 1 .. input'Last);
            end if;
      end case;
   end Transform;
   
   procedure Lyrics(name : in String)
   is
      normalized : constant String := Normalize_Case(name);
   begin
      Ada.Text_IO.Put_Line(normalized & ", " & normalized & ", bo-" & Transform(normalized, 'b'));
      Ada.Text_IO.Put_Line("Banana-fana, fo-" & Transform(normalized, 'f'));
      Ada.Text_IO.Put_Line("fi-fee-mo-" & Transform(normalized, 'm'));
      Ada.Text_IO.Put_Line(normalized & '!');
      Ada.Text_IO.New_Line;
   end Lyrics;

   names : constant array(1 .. 5) of ASU.Unbounded_String :=
     (+"Gary",
      +"EARL",
      +"billy",
      +"FeLiX",
      +"Mary");
begin
   for name of names loop
      Lyrics(+name);
   end loop;
end The_Name_Game;
Task: The Name Game


C++: #include <algorithm>
#include <iostream>
#include <string>
#include <vector>

static void printVerse(const std::string& name) {
    std::string x = name;
    std::transform(x.begin(), x.end(), x.begin(), ::tolower);
    x[0] = toupper(x[0]);

    std::string y;
    switch (x[0]) {
    case 'A':
    case 'E':
    case 'I':
    case 'O':
    case 'U':
        y = x;
        std::transform(y.begin(), y.end(), y.begin(), ::tolower);
        break;
    default:
        y = x.substr(1);
        break;
    }

    std::string b("b" + y);
    std::string f("f" + y);
    std::string m("m" + y);

    switch (x[0]) {
    case 'B':
        b = y;
        break;
    case 'F':
        f = y;
        break;
    case 'M':
        m = y;
        break;
    default:
        break;
    }

    printf("%s, %s, bo-%s\n", x.c_str(), x.c_str(), b.c_str());
    printf("Banana-fana fo-%s\n", f.c_str());
    printf("Fee-fi-mo-%s\n", m.c_str());
    printf("%s!\n\n", x.c_str());
}

int main() {
    using namespace std;

    vector<string> nameList{ "Gary", "Earl", "Billy", "Felix", "Mary", "Steve" };
    for (auto& name : nameList) {
        printVerse(name);
    }

    return 0;
}










Ada: with Ada.Characters.Handling;
with Ada.Strings.Unbounded;
with Ada.Text_IO;

procedure The_Name_Game
is
   package ACH renames Ada.Characters.Handling;
   package ASU renames Ada.Strings.Unbounded;
   function "+"(input : in String) return ASU.Unbounded_String renames ASU.To_Unbounded_String;
   function "+"(input : in ASU.Unbounded_String) return String renames ASU.To_String;
   
   function Normalize_Case(input : in String) return String is
   begin
      return ACH.To_Upper(input(input'First))
        & ACH.To_Lower(input(input'First + 1 .. input'Last));
   end Normalize_Case;

   function Transform(input : in String; letter : in Character) return String is
   begin
      case input(input'First) is
         when 'A' | 'E' | 'I' | 'O' | 'U' =>
            return letter & ACH.To_Lower(input);
         when others =>
            if ACH.To_Lower(input(input'First)) = letter then
               return input(input'First + 1 .. input'Last);
            else
               return letter & input(input'First + 1 .. input'Last);
            end if;
      end case;
   end Transform;
   
   procedure Lyrics(name : in String)
   is
      normalized : constant String := Normalize_Case(name);
   begin
      Ada.Text_IO.Put_Line(normalized & ", " & normalized & ", bo-" & Transform(normalized, 'b'));
      Ada.Text_IO.Put_Line("Banana-fana, fo-" & Transform(normalized, 'f'));
      Ada.Text_IO.Put_Line("fi-fee-mo-" & Transform(normalized, 'm'));
      Ada.Text_IO.Put_Line(normalized & '!');
      Ada.Text_IO.New_Line;
   end Lyrics;

   names : constant array(1 .. 5) of ASU.Unbounded_String :=
     (+"Gary",
      +"EARL",
      +"billy",
      +"FeLiX",
      +"Mary");
begin
   for name of names loop
      Lyrics(+name);
   end loop;
end The_Name_Game;