How can I calculate the value of pie(22/7) using C++? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 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 ответ
0
cout << 22.0/7.0; it gets the desired result
22nd May 2023, 9:59 AM
Sefa Alioglu
Sefa Alioglu - avatar