How can I calculate the value of pie(22/7) using C++? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

How can I calculate the value of pie(22/7) using C++?

It can't be done simply as '/' operator returns only integer values.

27th Jul 2019, 11:40 AM
Shourya Gautam
Shourya Gautam - avatar
1 Resposta
0
cout << 22.0/7.0; it gets the desired result
22nd May 2023, 9:59 AM
Sefa Alioglu
Sefa Alioglu - avatar