I'm reading characters from the input. Once I find that I've moved to the next row, by checking that the character is a special token, I want the code to put that character back so that it is as if none of the characters on that row have been read.
How do I do that?
This is what I have so far.
char nm; int i=0;
double thelow, theupp; double numbers[200];
for(i=0;i<4;++i)
{
{
char nm;
double thelow, theupp; /*after erased, created again*/
scanf("%c %lf %lf", &nm, &thelow, &theupp);
for (k = 0; ; ++k) ;
{
scanf("%lf", numbers[k]);
if(numbers[k] == '\n')
break;
}
/* calling function and sending data(nm,..) to it */
} /*after } is seen (nm ..) is erased*/
;
}
input;
D -1.5 0.5 .012 .025 .05 .1 .1 .1 .025 .012 0 0 0 .012 .025 .1 .2 .1 .05 .039 .025 .025
B 1 3 .117 .058 .029 .015 .007 .007 .007 .015 .022 .029 .036 .044 .051 .058 .066 .073 .080 .088 .095 .103