1. Home
  2. Computing & Technology
  3. Delphi Programming
RTL referenceGlossaryTips/Tricks|FREE App/VCL|Best'O'Net|Books|Link To
 
Delphi Code Puzzle: Square and a square root of a number
Problem: Let the user type a value for a real variable ANumber. If ANumer is greater than 0, the program should output the square root of ANumber; if ANumer is less or equal to 0, the program should output the square of ANumber.
 Delphi Code Puzzle: 004
• Start the PUZZLE
 Join the Discussion
"Post your views, comments, questions and doubts for this code puzzle."
Discuss!
 Related Resources
• More Code Puzzles

• Quizzes, Tests and Trivia

• A Beginner's Guide to Delphi Programming
 From Other Guides
• Quizzes and Tests in About Computing & Technology

   Delphi Code Puzzle: 004
Problem: Let the user type a value for a real variable ANumber. If ANumer is greater than 0, the program should output the square root of ANumber; if ANumer is less the 0, the program should output the square of ANumber.

Have you solved this puzzle? Try out more Delphi Programming Code Puzzles!

Puzzle Solving Description
All the Delphi Programing Code Puzzles are designed on the same principal. To learn more about Delphi Programing Code Puzzles, see: Delphi Code Puzzles.

When you reach to the end - by solving this Delphi Pascal code puzzle, you'll have the option to see whether your code can be compiled in Delphi, or not.

If the code is correct and, therefore, can be compiled, BRAVO, you've solved the puzzle.

   Try the Puzzle
See if you can solve this Delphi Code Puzle: Start the PUZZLE

Have you solved this puzzle? Try out more Delphi Programming Code Puzzles!

Get informed when the next Delphi Programming Code Puzzle becomes available online, for FREE:

Subscribe to the Newsletter
Name
Email

Of course, don't forget to join the Forum where all the questions are answered and beginners are treated as experts:

Explore Delphi Programming
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Delphi Programming

©2009 About.com, a part of The New York Times Company.

All rights reserved.