Tuesday, October 15, 2013

uri online judge 1004 solution

here is uri online judge 1004 problem: http://www.urionlinejudge.com.br/judge/en/problems/view/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 InputSample Output
3
9
PROD = 27

here is my solution: http://ideone.com/15YjWH

#include <iostream>
using namespace std;

int main() {
int x, y, PROD;
cin >> x >> y;
PROD = x * y;
cout << "PROD = " << PROD << endl;
return 0;
}

my note: before solution i ranked 4073 generally, now i rank 3836 generally

No comments:

Post a Comment