#include #include #include using namespace std; int main() { setlocale(LC_CTYPE,"Russian"); int i=1,n,x,otv; char ot; do{ float sum=0; cout<<"Введите количество повторов\t"; cin>>n; if(n<0) { cout<<"Вы ввели отрицательное количество повторов.\n"; cout<<"По умолчанию оно умножится на -1\n"; n*=(-1); } cout<<"Введите x\t"; cin>>x; cout<<"Выберите цикл\n"<<"1-while\t"<<"2-for\t"<<"3-do while\n"; cin>>otv; switch(otv) { case 1: while(i>ot; }while(ot=='y'||ot=='Y'); return 0; }