There are many possible solutions for this.
1) You can use fflush(stdin). This is not recommended though.
2) You can use getche() instead of scanf.
Example:
gender=getche();
3). Or...
Type: Posts; User: PrashantDhamija
There are many possible solutions for this.
1) You can use fflush(stdin). This is not recommended though.
2) You can use getche() instead of scanf.
Example:
gender=getche();
3). Or...
Give some initial value greater than i, that is greater than 1 to split so that loop can be initialized. Change x to any value>i.
int i,split=x,n_split;
float km,n_km;
clrscr();
...