How can I calculate the value of pie(22/7) using C++? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 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 Antwort
0
cout << 22.0/7.0; it gets the desired result
22nd May 2023, 9:59 AM
Sefa Alioglu
Sefa Alioglu - avatar