Search Blog

Wednesday, February 16, 2022

How to Print any Statement More than 1 time using WHILE Loop?

            Here We Will Learn To Program C. I'll try To give my Best To Make you understand.

                                                               "Let's Begin"

A Programme To Print "MySelf Sahil Saini " 10 Times using 
WHILE Loop

 Now I Will only Make to guys understand only the New Function. To Understand other thing Check My other BLOGS

  • int i=1;
    while(i<11)
    {
           printf("Myself Sahil Saini");
           i++;
    }

    Here int i=1; int stand for Integer . Value of i is initialized .  while(i<11){} [syntax :- while(Test expression){}]. The Loop will run till 10 it will stop at 11 or greater value. Hence It will run 10 times. You Can run it more by Changing Test Expression. Value is exceeded by 1 Using i++. We can do increment by 2 or Greater Value by writing i=i+2(for 2 Increment) or i=i+n(for Increment of n Natural Number).

OUTPUT

Download Link Of Above Programme:-

How to Use it.
Download File >Go To Turboc3(or turboc folder)>bin>Paste File>
open Turbo c Application>File>open(or F3)>Select File
 
NOTE:- Above File Can Be Opened With Other Compilers(Like code blocks, visual studio, etc.), Some Changes Might Require.

THANKS

No comments:

Post a Comment

How to Add Two Array(or Matrix) ?

    Here We Will Learn To Program C. I'll try To give my Best To Make you understand.                                                   ...