Originally Posted by
Salem
So what are you stuck on?
Can you read a char and tell whether it's P, C or S ?
If you know you've chosen 'C' say, can you then go onto read parameters L,a,b ?
In short, you need to put forth some actual effort.
Colouring in your prose and dumping your assignment doesn't count.
Make an honest attempt, post your code where you get stuck, and ask a specific question.
Eg
"I can read all the parameters for C type capacitor, but why does it always prints zero?".
That is a specific question based on some coding effort.