Accountancy, asked by anshikagarwal2628, 2 months ago

Positions on a chess board are identified by a letter and a number. The letter identifies the column, while the number identifies the row, as shown below:Write a program that reads a position from the user. Use an if statement to determine if the column begins with a black square or a white square. Then use modular arithmetic to report the color of the square in that row. For example, if the user enters a and 1 then your program should report that the square is black. If the user enters d and 5 then your program should report that the square is white. If a user enters a wrong position display an error message stating "Invalid Position".​

Answers

Answered by tripathimaitray
2

Answer:

sd

ffþķkkkkkkkkkkkkkkkkkkkkkkkkkkksskskskskslsksl

Similar questions