0

How the pi function is used in c++???

pi function comes in math.h heading

12th Dec 2016, 5:52 PM
Dipak Jain
Dipak Jain - avatar
2 Respostas
0
we all know PI to be 22/7 which results to 3.142 when rounded up to 3 decimal places. In your code, just define PI and you are set to go. example #define PI 3.142 you can also make it a constant since PI doesnt change.
12th Dec 2016, 8:04 PM
Franky BrainBox
Franky BrainBox - avatar
0
how it works??
13th Dec 2016, 3:11 AM
Dipak Jain
Dipak Jain - avatar