Beginner C/C++

Moderators: None (Apply to moderate this forum)
Number of threads: 5254
Number of posts: 16679

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Chess program Posted by powerranger on 16 Nov 2009 at 3:46 AM
Hi all,

I'm trying to do a practice from a book I learn from,
and no success so far.

"This program will be asked to answer whether the black king is threatened – by white Tools (condition called chess), or not threatened.
Threat to the King is that there is a white tool that can access the square which is the black king
during one play.
The program prompts the user to enter three numbers of the row, column, tool, and return on it in a loop
until final input. Input series ends when one of the values of the column, row or tool exceeds
Defined boundaries. I.e.: tool less than - 1, greater than - 5 or coordinates tile extends beyond the boundaries
Board. As in the previous sections, the negative coordinates are considered exception limits the board.
There is no limit on the amount of different types of white tolls on the board, but the black king appears exactly once. (You may assume that the input does contain black king greater than once), given an input for a slot that already taken, error message will appear: "Already taken!"
After the input sequence, the program prints "check!" Or "! No check" in accordance with the state board."

I translate it, so sorry for bad english.
can some help me with an idea? or code?

I'm a beginner so no functios an such:(




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.