Программа перестает отвечать после ввода диаметра [закрыто] ⇐ C++
Программа перестает отвечать после ввода диаметра [закрыто]
I'm working on a program for a class. The prompt is "Write a program that asks the user their name and the diameter or the pizza they want, calculate the area of the pizza using PI to four decimal places (3.1415) but show the area of their Pizza to the user to two decimal places by using setprecision and fixed from chapter 3 on the output." The issue I'm running into is that once the diameter is input by the user, the program no longer responds.
#include #include #include using namespace std; int main() { string firstName; double Diameter, Area; const double Pi = 3.1415; cout > firstName; cout > Diameter; double Radius = Diameter / 2; cout > Area; Area = Pi * Radius * Radius; cout
Источник: https://stackoverflow.com/questions/781 ... r-is-input
I'm working on a program for a class. The prompt is "Write a program that asks the user their name and the diameter or the pizza they want, calculate the area of the pizza using PI to four decimal places (3.1415) but show the area of their Pizza to the user to two decimal places by using setprecision and fixed from chapter 3 on the output." The issue I'm running into is that once the diameter is input by the user, the program no longer responds.
#include #include #include using namespace std; int main() { string firstName; double Diameter, Area; const double Pi = 3.1415; cout > firstName; cout > Diameter; double Radius = Diameter / 2; cout > Area; Area = Pi * Radius * Radius; cout
Источник: https://stackoverflow.com/questions/781 ... r-is-input
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
-
Окно SWT перестает отвечать на запросы при обновлении индикатора выполнения из потока
Anonymous » » в форуме JAVA - 0 Ответы
- 41 Просмотры
-
Последнее сообщение Anonymous
-
-
-
Приложение PHP-FPM внезапно перестает отвечать на запросы до перезапуска контейнера
Anonymous » » в форуме Php - 0 Ответы
- 29 Просмотры
-
Последнее сообщение Anonymous
-