Page 1 of 1

C++ Problem PROBLEM: In a game of chess, you can estimate the strength of a current game by adding up the "weights" of t

Posted: Mon Jun 06, 2022 12:09 pm
by answerhappygod
C++ Problem
PROBLEM: In a game of chess, you can estimate the strength of a
current game by adding up the "weights" of the pieces on the board.
One weighting system is: 9-Queen, 5-Rooks, 3-Knights,
3-Bishops, 1-Pawn
Write a program to ask the user how many of each type of piece
is on the board. Compute and display the total value of the
pieces.
For example: if the user had 1 rook, 2 bishops, and 5 pawns on
the board, the total value would be 16 (1*5+2*3+5*1).