Ask Question
14 June, 21:51

How to Create a while loop

+3
Answers (2)
  1. 14 June, 22:54
    0
    For C/C + +, C# for while loop has the same layout.

    while (/*condition*/)

    {

    / / TO DO

    }

    for e. g:

    int main ()

    {

    int sum = 0, i = 0;

    //While loop

    while (i < = 100)

    sum + = i++;

    printf ("Sum %d", sum);

    getchar ();

    return 0;

    }

    This code will sum from 0 to 100 (Sigma from x = 0 to 100 of x)
  2. 15 June, 01:27
    0
    While (condition) ( = = !+)

    {

    code block

    }

    some think like this
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “How to Create a while loop ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers