I give it a brief search and run some tests even on scripts as well and I found the following outcomes,
in script format I test it as,
<script>
var a = 5;
var b = 5;
var c = 7;
var d = 6;
var ee = 6;
var f = 8;
var g = 9;
var h = 6;
var i = 6;
var j = 4;
var k = 8;
var l = 9;
var m = 5;
var x = a * b * c * d * ee * f * g * h * i * j * k * l * m;
var y = eval(a * b * c * d * ee * f * g * h * i * j * k * l * m);
document.writeln("RESULT X : " + x);
document.write("<br>");
document.writeln("RESULT Y : " + y);
</script>
and the outcome was 23514624000
for both x
and y
, but in c# as you try to multiply all integers and in result an integer is formed but we also know that int.MAX = 2147483647
which is less then thw actuall result, So in result when assigning to long x= a * b * c * d * ee * f * g * h * i * j * k * l * m;
it truncates the original values, and in other result it is not, if you want same result in both you can use following code,
int a = 5;
int b = 5;
int c = 7;
int d = 6;
int ee = 6;
int f = 8;
int g = 9;
int h = 6;
int i = 6;
int j = 4;
int k = 8;
int l = 9;
int m = 5;
long x = (long)a * b * c * d * ee * f * g * h * i * j * k * l * m;
double aa = 5;
double ab = 5;
double ac = 7;
double ad = 6;
double aee = 6;
double af = 8;
double ag = 9;
double ah = 6;
double ai = 6;
double aj = 4;
double ak = 8;
double al = 9;
double am = 5;
long y = (long)(aa * ab * ac * ad * aee * af * ag * ah * ai * aj * ak * al * am);
Console.WriteLine(x);
Console.WriteLine(y);
Console.ReadKey();
Now you will get the same result i.e 23514624000