The statements
Code:
n<=100;
l>=1 && l<=5;
effectively do nothing. You have to use an if statement, like this:
Code:
if(n <= 100 && (l >= 1 && l <= 5))
{
...
}
You seem to use the for loop incorrectly. It is used like this:
Code:
for(initialization; condition; counting)
{
...
}
As in
Code:
for(start = 0; start < end; ++start)
{
...
}
A switch statement could help:
Code:
switch(l)
{
case 1:
for (x = 1; x <= n; x++)
printf ("GOOD LUCK\n");
break;
case 2:
for (x = 1; x <= n; x++)
printf ("BUENA SUERTE\n");
break;
case 3:
for (x = 1; x <= n; x++)
printf ("BONNE CHANCE\n");
break;
case 4:
for (x = 1; x <= n; x++)
printf ("BUONA FORTUNA\n");
break;
case 5:
for (x = 1; x <= n; x++)
printf ("VIEL GLUECK\n");
break;
}
But that is painfully ineffective. Instead, you should use an array.
Code:
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char **argv)
{
char *greets[] = { "GOOD LUCK",
"BUENA SUERTE",
"BONNE CHANCE",
"BUONA FORTUNA",
"VIEL GLUECK" }
...
for(x = 0; x < n; ++x)
printf("%s\n", greets[l]);
return EXIT_SUCCESS;
}