1. Computing
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

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:

©2013 About.com. All rights reserved.