Answer the question
In order to leave comments, you need to log in
How to solve the problem of output from a stream?
There is a code:
#include <iostream>;
#include <conio.h>;
#include <string>;
using namespace std;
void area_ellipse()
{
setlocale(LC_ALL, "Russian");
cout << "\t\t\t\t\t****Площадь эллипса, через полуоси****\n\n\n\n" << "S = pi * R * r" << " Где R - большая полуось; r - малая полуось\n" << "Хотите воспользоваться калькулятором? y\n ";
string input;
if (input == "y")
{
double pi(3.14), R(0), r(0);
cout << "R = ";
cin >> R;
cout << "r = ";
cin >> r;
cout << R * r * pi << " = 3.14 * " << R << " " << r << endl;
}
else
{
exit(0);
}
}
void area_of_plane_figures()
{
setlocale(LC_ALL, "Russian");
cout << "Доступно:\n 1) Площадь эллипса, через полуоси;\n 2) ;\n 3) ;\n 4) ;\n 5) ;\n 6) ;\n 7) ;\n 8) ;\n 9) Выход в главное меню;" << endl;
int input;
cin >> input;
while (true)
{
if (input == 1)
{
}
}
}
void main_formulas()
{
setlocale(LC_ALL, "Russian");
cout << "\t\t\t\t\t****Формулы****\n\n\n\n" << endl;
cout << "Доступно:\n 1) Площадь плоских фигур;\n 2) ;\n 3) ;\n 4) ;\n 5) ;\n 6) ;\n 7) ;\n 8) ;\n 9) Выход в главное меню;" << endl;
while (true)
{
int input;
cin >> input;
switch (input)
{
case 1: cout << "\t\t\t\t\t****Площадь плоских фигур****\n\n"; area_of_plane_figures(); break; break;
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
}
}
}
void main_start()
{
setlocale(LC_ALL, "Russian");
cout << "Доступно:\n 1) Формулы; 9) Выход;" << endl;
while (true)
{
int input;
cin >> input;
switch (input)
{
case 1: main_formulas(); break;
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9: exit(0); break;
default: cout << "Неизвестный ввод! Повторите попытку.";
}
}
_getch();
}
int main()
{
setlocale(LC_ALL, "Russian");
cout << "\t\t\t\t\t****Проект****\n\n\n\n" << endl;
main_start();
return 0;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question