C
C#leaner
I am getting squggly blue on (i==1) as well as on d.
class Program
{
static void Main(string[] args)
{
string d;
int i;
for (i = 0; i < 12; )
{
i++;
if (i == 1) d = "first";
if (i == 2) d = "second";
if (i == 3) d = "third";
if (i == 4) d = "fourth";
if (i == 5) d = "fifth";
if (i == 6) d = "sixth";
if (i == 7) d = "seventh";
if (i == 8) d = "eighth";
if (i == 9) d = "ninth";
if (i == 10) d = "tenth";
if (i == 11) d = "eleventh";
if (i == 12) d = "twelveth";
Console.WriteLine("\nOn the, {0}, day of Christmas", d);
Console.WriteLine("\nmy true love sent to me\n");
switch (d)
{
case "first":
Console.WriteLine("\nA Partridge in a Pear Tree\n");
case "second":
case "third":
case "fourth":
case "fifth":
case "sixth":
case "seventh":
case "eighth":
case "ninth":
case "tenth":
case "eleventh":
case "twelveth":
case "default":
break;
}
i++;
}
}
}
class Program
{
static void Main(string[] args)
{
string d;
int i;
for (i = 0; i < 12; )
{
i++;
if (i == 1) d = "first";
if (i == 2) d = "second";
if (i == 3) d = "third";
if (i == 4) d = "fourth";
if (i == 5) d = "fifth";
if (i == 6) d = "sixth";
if (i == 7) d = "seventh";
if (i == 8) d = "eighth";
if (i == 9) d = "ninth";
if (i == 10) d = "tenth";
if (i == 11) d = "eleventh";
if (i == 12) d = "twelveth";
Console.WriteLine("\nOn the, {0}, day of Christmas", d);
Console.WriteLine("\nmy true love sent to me\n");
switch (d)
{
case "first":
Console.WriteLine("\nA Partridge in a Pear Tree\n");
case "second":
case "third":
case "fourth":
case "fifth":
case "sixth":
case "seventh":
case "eighth":
case "ninth":
case "tenth":
case "eleventh":
case "twelveth":
case "default":
break;
}
i++;
}
}
}