“Sometimes it is the people no one can imagine anything of who do the things no one can imagine.” ― Sir Alan Turing


ADS

ADS

Saturday, November 5, 2016

URI 1004 - Simple Product || Solution in C / C++



Read two integer values. After this, calculate the product between them and store the result in a variable named PROD. Print the result like the example below. Do not forget to print the end of line after the result, otherwise you will receive “Presentation Error”.

Input

The input file contains 2 integer numbers.

Output

Print PROD according to the following example, with a blank space before and after the equal signal.
Input SamplesOutput Samples
3
9
PROD = 27
-30
10
PROD = -300
0
9
PROD = 0

SOURCE CODE

#include <stdio.h>

#include <stdio.h>

int main() {
  int A, B, PROD;

  scanf("%d %d", & A, & B);
  PROD = A * B;
  printf("PROD = %d\n", PROD);

  return 0;
}

No comments:

Post a Comment