@JKSH Thanks for solving basic confusion. I have one more doubt also. Here, I have attached program for verification. I hope you can provide a proper solution
You're welcome. I'm happy to teach you basics. However, verifying your program is too difficult to do on a forum.
You need to do 2 things:Take C++ lessons Practice writing and debugging simple programs for your hardware