Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

A Beginner's Guide to D/Conditions and Loops/The Concepts of Conditionals and Loops

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

At this point, you should know how to do some simple interaction with the user. But without conditions or loops, your programs can only follow one simple pattern. One fundamental capability of any programming language is conditions. A condition statement, such as an if statement, causes different code to run depending on whether a condition is true or false. if statements will be introduced in the following section. Another important ability is a loop. It's often necessary to make one section of code run multiple times. The foreach, for and while loops allow this. They will be introduced later in this chapter.