I am trying to code a program that switches a user inputed statement into morse code but i keep getting that error. this is a segment of my code.
main()
{
char input;
int i=0,n;
printf("Enter a phrase to translate into morse code: ");
scanf("%c",&input);
printf("Enter the number of letters in that phrase: ");
scanf("%d",&n);
while(i=0, n<i, ++i)
{
switch(input)
case 'A':
case 'a': printf(".-");
break;
case 'B':
case 'b': printf("-...");
break;
case 'C':
case 'c': printf("-.-.");
break;
case 'D':
case 'd': printf("-..");
break;
}
}
main()
{
char input;
int i=0,n;
printf("Enter a phrase to translate into morse code: ");
scanf("%c",&input);
printf("Enter the number of letters in that phrase: ");
scanf("%d",&n);
while(i=0, n<i, ++i)
{
switch(input)
{ case 'A':
case 'a': printf(".-");
break;
case 'B':
case 'b': printf("-...");
break;
case 'C':
case 'c': printf("-.-.");
break;
case 'D':
case 'd': printf("-..");
break;
}
}
}