Explain the while statement - computer programming, Programming Languages

Assignment Help:

Explain the While Statement - Computer Programming?

A 'while statement' is an entry controlled loop statement. When the expression is calculated and the condition is not satisfied, it won't allow executing the statements inside the loop and if condition is true, then statements get executed. It checks the condition continually until the condition goes false and once false condition occurs the control is transferred to out side of the loop.

The universal form of while statements is

            while(expression)

            {

                        statements;

            }

instance:

            while(x<5)

            {

                        x=x+5;

            }


Related Discussions:- Explain the while statement - computer programming

Create xml document to save calendar information, Prepare an XML document t...

Prepare an XML document that contains calendar information such as the following text describes: The calendar is owned by a person (e.g. John Smith) and has a few paragraphs tha

Maze game, The Maze Game from Laboratory 7 loads its maze directly in the p...

The Maze Game from Laboratory 7 loads its maze directly in the program's code. This should be avoided as it requires the program to be recreated if the maze needs to be changed. In

Java project, NOTE: You will only submit the University.java and EmptyFileE...

NOTE: You will only submit the University.java and EmptyFileException.java files (inside P3.zip/tar) NOTE on null objects:. From Project 1: Since the array of students in the Cou

Write an xslt-flatten the tree, Flatten the tree Consider the followin...

Flatten the tree Consider the following XML input, which groups people into two categories-salaried and hourly: Warren Rosenbaum 37 5.75

Characteristics of procedure-oriented programming, Characteristics of proce...

Characteristics of procedure-oriented programming: Emphasis is on doing things (algorithms). Large programs are divided into smaller programs known as functions.

Excel, basic steps involved in spreadsheet developement

basic steps involved in spreadsheet developement

Asp.net and c#, The method should call getAllCities() and return the index ...

The method should call getAllCities() and return the index of the City that has the shortest (euclidian) distance to the. longitude and latitude passed as parameters

Prolog predicate for list that contains duplicate elements, Write a Prolog ...

Write a Prolog predicate  has_duplicates(L)  that is true if list  L  contains duplicated elements (that is at least 2 copies of an element). For instance: ?- has_duplicates([a,

Design and implement program, Tamagochi were all the rage in the 90's as a ...

Tamagochi were all the rage in the 90's as a small toy that had limited functionality but modelled a pet. The "owner" could do the following • Feed the pet • Heal the pet

Small perl program, 1. use a small perl program and matching config file to...

1. use a small perl program and matching config file to retrieve and reformat the system time for a number of remote machines via snmp.  Readings should have a local timestamp for

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd