vendredi 29 octobre 2021

how to solve this c++ project?

  • defines an '*' operator in his project, which he is developing. This operator comes between two numbers A, and B, and performing this operator on these numbers produces an expression that A is repeated B times and after that B is repeated A times. Following this, he alternately puts '+' and '-' before the numbers (before the first number '+' comes and then alternately '-' and '+'). In the end, the answer of A
  • B is the result of the expression. Your task is to help him calculate the answer of A * B when he gives you these two numbers. Input The only line of the input indicates two integers A and B. 1 <= A, B <= 100 Output Print a single line that indicates the result of A*B.

Aucun commentaire:

Enregistrer un commentaire