Do While
Hello friends welcome again Hello, hi!!!
Look.
Another loop of C++ programming.
So in this it will first do the operation and then it will see whether the condition is true or not. In detail it is opposite of while loop in that loop first the condition is checked and then if that's true than further program will be exicuted.
Here is the example program
of the Do while loop.
If you see it properly then
you will conclude that this program is just to show example of Do while loop
nothing else because there is no use of this program.
In this program the
condition is the value of "a"(Entered by user) must be less than or
equal to 8. Ok! When the value of "a" will less than or equal to 8
than, it will be added by variable "f"(f=10.26). And the addition
value will be stored in variable "b" and then the value of
"a" will be incremented by +1. And then it will be executed again and
again until the condition becomes true.
Simple...
Good content and really useful for me.
ReplyDelete