Why do you need help converting if/else if to switch/case? It's REALLY easy. Have you even tried, or are you just assuming it's difficult? Or is the problem that you don't know the syntax?

Anyway, here's an example:

Code:
if (a==1) { ..; }
else if (a==2) { ..; }
else if (a==3) { ..; }
else { ..; }

switch (a)
{
case 1: { ..; break; }
case 2: { ..; break; }
case 3: { ..; break; }
default: { ..; break; }
}
For storing stuff to a file have a look at fopen, fclose, fgets and fprintf.