Look at your code:
fin.close();
}
{ <<<<<---- What's this doing here?
void Skaityti();
return 0;
Remove it, and see what happens
Also this:
fout.close();
}
{ <<<<<---- Eh?
Skaityti();
Spausdinti();
return 0;
}
And do yourself a favour: pick an indentation style as stick with it - you can even use the execrable 1TB if you must as long as you are consistent. Mix'n'match doesn;t make your code any easier to read - and makes problems like this harder to see.