Asalam o alikum. I hope you are enjoying good health by the grace of Allah Almighty.
In this previous blog,I have discussed about loops.Now,in this blog,I will discuss a simple example of While loop.
Remember that While loop is used to repeat a statement,etc if we do not know in advance how many times we want to repeat that statement,etc.So,the syntax of While loop is
In this previous blog,I have discussed about loops.Now,in this blog,I will discuss a simple example of While loop.
Remember that While loop is used to repeat a statement,etc if we do not know in advance how many times we want to repeat that statement,etc.So,the syntax of While loop is
Syntax
while(condition)
statement;
Or
while(condition)
{
statement(s);
}
Example
Source code
No comments:
Post a Comment