programming languages - How to write a loop with only if-else? -


Someone once told me that you can do any programming functions with only -Are statements.

I want to know:

  1. Is this statement correct? (My understanding depends on the ability of the loop with typing-perfection and if / does not complete any turing)
  2. Is it possible to write a loop only with the details?

How would you loop through this if only other? ["Fruit", "Car", "Water"]

Engineer for a recursive on the opposite If the recitation is the process of repetition of objects in a self-similar way -

Calculating Fibonacci numbers is a great example to understand the rearrangement (the simplest and trivial example).

Public Entity Fibonacci (Int N) {If (N & T; = 1) returns N; Return the second Fibonacci (N-1) + Fibonacci (N-2); }

But there are some disadvantages of recycling in most popular programming languages: (A) It is slow on large iteration and (b) uses a lot of memory for the performance pile.

So, yes, it is possible to write the loop only with other statements.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

lua - HowTo create a fuel bar -