All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Algorithms
Single Line Expression (Posted on 2008-01-27) Difficulty: 1 of 5
Give a single line "C type" expression to evaluate (-1)k using only +,-,* and % operators.

See The Solution Submitted by Praneeth    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Whole numbers? | Comment 3 of 6 |
Are we to assume that k is an integer?
  Posted by Erik O. on 2008-01-28 09:48:32
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (6)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information