// whlie loop is almost similar to "do whlie loop".
// but the basic difference over here is that ki jaha do while at
least ek bar to execute hota hi he,
// but whlie tabhi me code tabhi execute hoga jab whlie condition
true hogi otherwise nhi.
// whlie loop me string litteral statement me ";" nhi use hota he.
// besic syntex of whlie loop:
/* while (condition)
{
// code to executed //(no semicolon)
}*/
#include <stdio.h>
int main(int argc, char const *argv[])
{
int i = 0;
printf ("enter a number less then 15: ");
scanf ("%d", &i);
while (i < 15)
{
printf("%d\n", i);
i = i+1;
}
return 0;
}
No comments:
Post a Comment
here we are to help you.you can watch videos and get information about :- (1) scientific facts (2) education (3) gaming (4) music (5) lyrics (6) cartoons and many more.So keep watching keep learning, thank you.