How to use while loop as a IF statment | Alternative of IF in programming |
Hello everyone this article is helpful for who want alternative of IF statement. You can use while loop at instead of IF statement. but how?
By using break keyword you can achieve this.
Let write a code that's check even number
n=24
While(n%2==0){
Print (“even”);
Break;
}
I hope this will helpful for you.
THANKS
Comments
Post a Comment