Есть ответ 👍

Что выведится в фрагменьте s: 0; a: =1; while a< 2do begin s: =s+a; a: =a+0.5; writeln(a: 5: 2,s: 5: 2)end;

142
279
Посмотреть ответы 2

Ответы на вопрос:

Ira200489
4,7(62 оценок)

Если ты переписал фрагмент правильно, то:   1.50 1.00  2.00 2.50 если end расположен перед writeln, то тогда ответ    2.00 2.50
Dara005
4,6(26 оценок)

#1: #include < iostream> #include < ctime> int main() {   srand(time(null));   const int arraysize = 10;   int mainarray[arraysize];           for (int i = 0; i < arraysize; i++)     mainarray[i] = rand() % 1000;       int maxnum = mainarray[0];   for (int i = 0; i < arraysize; i++)     if (mainarray[i] > maxnum)       maxnum = array[i];       std: : cout < < maxnum < < std: : endl;   system("pause");   return 0; } #2: #include < iostream> #include < cmath> using namespace std; int main() {   float     a_coef,     b_coef,     c_coef;   cout < < "input the coefficients (a * x^2 + b * x + c): ";   cin > > a_coef > > b_coef > > c_coef;       float res1, res2;       res1 =  (-b_coef + sqrt(b_coef * b_coef - 4 * a_coef * c_coef)) / (2 * a_coef);   res2 =  (-b_coef - sqrt(b_coef * b_coef - 4 * a_coef * c_coef)) / (2 * a_coef);       cout < < res1 < < "; " < < res2 < < endl;   system("pause");   return 0; } #3: #include < iostream> #include < ctime> int main() {   srand(time(null));   int     unknownnumber = rand() % 100 - 50,     attempts = 0,     inputtednumber;   while (true)   {     attempts++;     cout < < "input the number: ";     cin > > inputtednumber;           if (inputtednumber ! = unknownnumber)       cout < < "incorrect answer! try again! " < < endl;     else       break;   }   cout < < "attempts: " < < attempts;       system("pause");   return 0; }

Популярно: Информатика