Wednesday, December 2, 2015

Uri problem 1004 solve

Problem :

Simple Product

Adapted by Neilor Tonin, URI  Brazil
Timelimit: 1
Make a simple problem that only read two integer values. After that, calculate the product between them and store the result in a variable named PROD. Print the result like the sample below. Do not forget to print the end line after the result otherwise you will get “Presentation Error”.

Input

The input file will contain 2 integer numbers.

Output

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

Solution:


#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