[ create a new paste ] login | about

Link: http://codepad.org/1yfgVEIt    [ raw code | output | fork ]

C++, pasted on Dec 28:
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <iostream>
using namespace std;

int main()
{
	double mult  = 1;
	for(double i = 1; i <= 5; i++)
	//	if(i != 2)
		mult *= (i + 3)/(i - 2);
	cout<<"P = "<<mult<<endl;
	//cout<<"element i == 2 : 2 + 3/(2 - 2) was skipped!"<<endl;
	return 0;
}


Output:
1
P = -inf


Create a new paste based on this one


Comments: