Ok, the problem is only in function q31 and q311.
I left the complete code in the link above.
so here's this q311 function:
void q311(){
char forma;
int n,jota,b,i,j;
printf("Informe a figura e o tamanho: ");
scanf("%c",&forma);
scanf("%i",&n);
if (forma=='q')
{
for ( i = 0; i < n; ++i)
{
printf("*");
for ( b = 1; b < n; ++b)
{
if ((i==jota)|| (i==0))
{
printf("*");
}
else if (b==jota)
{
printf("*");
}
else
printf(" ");
}
printf("\n");
}
}
else if (forma=='t')
{
for(int i=n-1;i>=0;i--)
{
for(int j=0;j<=i;j++)
{
if(i==n-1 || j==0 ||i==j)
printf("*");
else
printf(" ");
}
printf("\n");
}
}
else
printf("Forma Invalida\n");
}
My program always looks like "Form Invalid" output even if you type "t" or "q" ... I wanted to know why this is happening.