×

# SIGFPE Runtime Error.

 0 Can someone please tell me when does one get SIGFPE runtime error. I'm pretty sure i'm not dividing by zero at any point in my code. asked 10 Jul '14, 22:21 11●1●2 accept rate: 0%

 0 On gcc -W and -Wall turn on different sets of warnings, so both of them are necessary. For more Visit: Innovative Apps Here.. answered 10 Jul '14, 22:34 16 accept rate: 0% can you please elaborate. i'm a newbie. also can you tell me about the different set of warnings. (11 Jul '14, 11:52)
 0 Hi. Could you please give a link to your code so we can see the code. It is difficult to say anything without that. answered 11 Jul '14, 15:21 3★kcahdog 10.0k●28●54●129 accept rate: 14%

# include <iostream>

using namespace std;

int main() { int count,i,a; unsigned int inputNumber; int cnt[10];

cin>>count;

for(i = 0;i<count;i++)
{
cin>>inputNumber;
cnt[i] = 0;
a = 5;
while(a < inputNumber)
{
cnt[i] = cnt[i] + inputNumber/a;
a = a * 5;
}
}

for (int j = 0; j < i; j++)
{
cout<<"\n"<<cnt[j];
}

return 0;


}

I am getting run time error .... where is my mistake .... i m not getting ??????

1
accept rate: 0%

 toggle preview community wiki:
Preview

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported
• mathemetical formulas in Latex between \$ symbol

Question tags:

×42
×19
×14
×11

question asked: 10 Jul '14, 22:21

question was seen: 4,837 times

last updated: 13 Jul '14, 00:39