I am getting segmentation fault(core dumped) at the time of compilation in my program. I am not able to detect the problem with the program. I am pasting my code. If anyone gets the problem then, please reply.
#include<bits/stdc++.h>
using namespace std;
typedef long double ld;
int main()
{
int a,b,c;
cin>>a>>b>>c;
ld dp[101][101][101];
for(int i=100;i>=0;i--)
{
for(int j=100;j>=0;j--)
{
for(int k=100;k>=0;k--)
{
if(i==100 || j==100 || k==100)
{
dp[i][j][k] = 0;
}
else
{
long double cnt = i+j+k;
dp[i][j][k] = 1 + (1.0*i/cnt)*dp[i+1][j][k] + (1.0*j/cnt)*dp[i][j+1][k] + (1.0*k/cnt)*dp[i][j][k+1];
}
}
}
}
cout<<dp[a][b][c];
return 0;
}