How to create my own header file?

code for my header file -

code for program in which i include this -

this is not running, please check it and help me. i don’t want to write same code in every problem.

Hi raghav
I ran your code and it ran successfully.
Could you tell me what issues are you facing?


This is the output of your code

ya, it worked later on. but that time it was not working and giving errors. may be some mistake was there. thanks a lot