Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Interview question
Message
De
31/10/2014 02:42:53
Lutz Scheffler (En ligne)
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
31/10/2014 01:16:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01610246
Message ID:
01610256
Vues:
90
>
>a = 1
>b = 2
>c = 10
>DO WHILE a <= c
>    a = a + 1
>ENDDO
>? a
>
>
>What is a?
>
>Is this a trick question?

Why a trick?
You increment a as long as it is smaller or even c. So it breaks at a = 11

b is superflous

In general:
if start of a<=c, a = c+1
if start of a>c , a = a

Lutz
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform