1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Shalnov [3]
3 years ago
13

Write any three type of looping structure with syntax​

Computers and Technology
1 answer:
schepotkina [342]3 years ago
7 0

Answer:

The correct answer to this question is given below in the explanation section.

Explanation:

There are three types of loops that are used almost in all programming languages today. Loop is used when you want to execute many times the same lines of codes.  These loops are given below:

For-loop

While-loop

Do-while loop

The syntax of these loops is given below. However, it is noted that these syntax are based on C++ language.  :

1-For-loop:

<em>for ( init; condition; increment/decrement ) { </em>

<em>   statement(s); </em>

<em>}</em>

init: this is executed first and only once, this allows to initialize and declare the loop control variable.

Condition: next condition is evaluated, if the condition is true then the loop body will get executed. And, if it gets false, the loop will get terminated.

increment: this will increment/decrement the counter (init) in the loop.

for example: to count number 1 to 10, the for-loop is given below:

<em>int total=0;</em>

<em>for (int i=0; i>10;i++)</em>

<em>{</em>

<em>total=total + i;</em>

<em>to</em>

<em>}</em>

2-While loop:

Repeats a statement or group of statements in the body of a while-loop while a given condition is true. It tests the given condition before executing the loop body.

syntax:

<em>while(condition) { </em>

<em>   statement(s); </em>

<em>}</em>

For example: To count number 0 to 10.

<em>int a = 0;  </em>

<em>int total =0;</em>

<em>   // while loop execution </em>

<em>   while( a < 11 ) { </em>

<em>      total = total + a</em>

<em>      a++; </em>

<em>   }</em>

<em />

3- do-while loop:

Do-while works like a while statement, while it tests the condition at the end of the loop body.

Syntax:

<em>do { </em>

<em>   statement(s); </em>

<em>}  </em>

<em>while( condition );</em>

<em />

For example:

<em>int a = 0;  </em>

<em>int total =0;</em>

<em>   // while loop execution </em>

<em>   do { </em>

<em>      total = total + a</em>

<em>      a++; </em>

<em>   }while( a < 11 )</em>

<em />

You might be interested in
In object-oriented analysis, an object is a member of a(n) _____, which is a collection of similar objects.
Advocard [28]

In object-oriented analysis, an object is a member of a CLASS, which is a collection of similar objects. It is a software engineering method.

<h3>Object-oriented analysis </h3>

Object-oriented analysis and design can be defined as a software engineering methodology.

This methodology (object-oriented analysis) is used to model a system as a particular group of interacting objects.

The object-oriented analysis is characterized due to the fact that objects are organized according to particular classes.

Learn more about object-oriented analysis here:

brainly.com/question/3522354

3 0
2 years ago
How does 5G technology enhance the Internet of Things (IoT)?
SashulF [63]

Answer:

<em><u>5G Will Quickly Become The New Standard For Cellular Networks. The Internet of Things (IoT) is rapidly developing and expanding. ... 5G will increase cellular bandwidth by huge amounts, making it much easier for the Internet of Things to network large numbers of devices together.</u></em>

Explanation:

Hope its help

5 0
3 years ago
A client contacted you to request your help in researching and supplying the hardware necessary to implement a SOHO solution at
Tcecarenko [31]

Answer:

Option 2 i.e., DHCP server.

Explanation:

A client approached the user to ask about their support towards investigating as well as providing necessary equipment required for implementing a SOHO system for his latest house corporation.  

So, the following SOHO router functionality facilitates the installation of IP addresses both for the cable and wireless networks on the private server.

7 0
3 years ago
Jimmy has been issued a citation for littering in a city park. When Jimmy
mixas84 [53]

Answer:

this violates with the

constitution

Explanation:

5 0
3 years ago
50 POINTS! What can be viewed in the Tasks folder? Check all that apply.
Rom4ik [11]

1, 2, and 4 :))) good luck

6 0
3 years ago
Read 2 more answers
Other questions:
  • I have been trying to work on this for a while now, and this is on excel
    11·1 answer
  • Processing is handled by the computer’s central processing unit (cpu).​ <br> a. True <br> b. False
    6·1 answer
  • 1- How should an operating system support communication between applications? explain your reasoning?
    10·1 answer
  • Hi whats airpods good for
    15·2 answers
  • You are the leader of a team at work. What type of leader would you like to be – one that gets involved and works with the team
    15·2 answers
  • Write the definition of a function reverse, whose first parameter is an array of integers and whose second parameter is the numb
    15·1 answer
  • Which of the displays could be represented by a single bit?
    12·2 answers
  • I CANT DO SKIN MODS ON BRAWLHALLA RIGHT!!!! IM SO MADDDDDDDDDDD
    11·1 answer
  • What does a hanging indent look like?
    7·1 answer
  • Which type of evidence should victims collect to help officials catch cyber bullies?home addressesbirthdayssocial media username
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!