[URI Online Judge] – 1004 – Simple product

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 Inputs Sample Outputs
3
9
PROD = 27
-30
10
PROD = -300
0
9
PROD = 0

Solution:

#include <cstdio>

int main(){
int a, b;
scanf(“%d”, &a);
scanf(“%d”, &b);
printf(“PROD = %d\n”, a * b);
return 0;
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s