Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Interview question
Message
From
31/10/2014 07:32:45
John Baird
Coatesville, Pennsylvania, United States
 
 
To
31/10/2014 02:42:53
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01610246
Message ID:
01610259
Views:
91
>>
>>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+1
>if start of a>c , a = a
>
>Lutz
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform