i am self taught programmer
i face a problem here that if condition to enter only ( H OR T OR . )
doesn't get the string . go to the (printf ("Enter valid characters please \n");
)
below is my code :
int i = 0 ;
int L ;
printf ("Please enter the lenght of report \n");
scanf ("%d" , &L);
if ( L>=1 && L<=500 )
{
printf ("Please enter the Reoprt \n");
string P = get_string ();
if (P[i] !='H' && P[i] != 'T' && P[i] != '.')
{
printf ("Enter valid characters please \n");
}
else
{
printf ("GOOD3 \n");
}
}
else
{
printf ("Please enter valid Length \n");
}