How to prevent overflows in C. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to prevent overflows in C.

I wrote a code to find the approximate number of prime numbers using a series. when I enter 2, I get 6 as my approximation instead of 0.6.. thanks in advance. 😃

7th Oct 2018, 5:19 PM
Godana Emiru
Godana Emiru - avatar
4 Answers
+ 1
Ina thanks sooooo much.. it worked 😊😊
9th Oct 2018, 12:40 PM
Godana Emiru
Godana Emiru - avatar
7th Oct 2018, 5:37 PM
Godana Emiru
Godana Emiru - avatar
0
Ina .. thanks for the reply.. I tried it but I get 6.00 instead of 0.6.
7th Oct 2018, 6:12 PM
Godana Emiru
Godana Emiru - avatar
0
should the power function appear before the main function.. sorry.. I am still learning how to use functions in C😅
7th Oct 2018, 8:07 PM
Godana Emiru
Godana Emiru - avatar