**hi! i need help on fixing this program i made it seems that i can't let it run. Can someone give me some advice on what errors i have made and how i can fix it. thanks **
#include <iostream.h>
#include <conio.h>
void main ()
{
int i;
int j;
for (i=1;i<=24;i++)
for (j=1;j<=24;j++)
{
if (i%2==1)
switch(i)
{
case 1:
cout<<"On the first day of christmas\n my true love sent to me:"<<endl;
break;
case 3:
cout<<"On the second day of christmas\n my true love sent to me:"<<endl;
break;
case 5:
cout<<"On the third day of christmas\n my true love sent to me:"<<endl;
break;
case 7:
cout<<"On the fourth day of christmas\n my true love sent to me:"<<endl;
break;
case 9:
cout<<"On the fifth day of christmas\n my true love sent to me:"<<endl;
break;
case 11:
cout<<"On the sixth day of christmas\n my true love sent to me:"<<endl;
break;
case 13:
cout<<"On the seventh day of christmas\n my true love sent to me:"<<endl;
break;
case 15:
cout<<"On the eight day of christmas\n my true love sent to me:"<<endl;
break;
case 17:
cout<<"On the ninth day of christmas\n my true love sent to me:"<<endl;
break;
case 19:
cout<<"On the tenth day of christmas\n my true love sent to me:"<<endl;
break;
case 21:
cout<<"On the eleventh day of christmas\n my true love sent to me:"<<endl;
break;
case 23:
cout<<"On the twelfth day of christmas\n my true love sent to me:"<<endl;
break;
default:
break;
}
}
if (j%2==0)
{
switch (j)
{
case 2:
cout<<"A partridge in a pear tree"<<endl;
break;
case 4:
cout<<"Two turtle doves and\n A partridge pear tree"<<endl;
break;
case 6:
cout<<"Three french hens\n Two Turtle doves and\n A partridge pear tree"<<endl;
break;
case 8:
cout<<"Four calling birds\n Three french hens\n two turtle doves and\n A partridge pear tree"<<endl;
break;
case 10:
cout<<"Five golden rings\n Four calling birds\n Three french hens\n two turtle doves and\n A partridge pear tree"<<endl;
break;
case 12:
cout<<"Six geese a-laying\n Five golden rings\n Four calling birds\n Three french hens\n two turtle doves and\n A partridge pear tree"<<endl;
break;
case 14:
cout<<"Seven swans a-swimming\n Six geese a-laying\n Five golden rings\n Four calling birds\n Three french hens\n two turtle doves and\n A partridge pear tree"<<endl;
break;
case 16:
cout<<"Eight maids a-milking\n Seven swans a-swimming\n Six geese a-laying\n Five golden rings\n Four calling birds\n Three french hens\n two turtle doves and\n A partridge pear tree"<<endl;
break;
case 18:
cout<<"Nine ladies dancing\n Eight maids a-milking\n Seven swans a-swimming\n Six geese a-laying\n Five golden rings\n Four calling birds\n Three french hens\n two turtle doves and\n A partridge pear tree"<<endl;
break;
case 20:
cout<<"Ten lords a-leaping\n Nine ladies dancing\n Eight maids a-milking\n Seven swans a-swimming\n Six geese a-laying\n Five golden rings\n Four calling birds\n Three french hens\n two turtle doves and\n A partridge pear tree"<<endl;
break;
case 22:
cout<<"Eleven pipers piping\n Ten lords a-leaping\n Nine ladies dancing\n Eight maids a-milking\n Seven swans a-swimming\n Six geese a-laying\n Five golden rings\n Four calling birds\n Three french hens\n two turtle doves and\n A partridge pear tree"<<endl;
break;
case 24:
cout<<"Tweleve drummers drumming\n Eleven pipers piping\n Ten lords a-leaping\n Nine ladies dancing\n Eight maids a-milking\n Seven swans a-swimming\n Six geese a-laying\n Five golden rings\n Four calling birds\n Three french hens\n two turtle doves and\n A partridge pear tree"<<endl;
break;
default:
break;
}
}
getch();
system("PAUSE");
return EXIT_SUCCESS;
}