Picmout
24.12.2022 22:50

нужна презентация на 20 страниц на тему:

Сайттық гиперсілтемелері мен навигациясы

Нажмите на рекламу ниже и сразу увидите ответ
Популярные вопросы:
Ответ:
Sawensia
08.03.2020 15:51
Программа выглядит примерно так

program n_1;  type    nazw = array[0..9] of String[15];  const    ed : nazw = ('ноль','один','два','три','четыре','пять','шесть','семь','восемь','девять');    des: nazw = ('','десять','двадцать','тридцать','сорок','пятьдесят',                       'шестьдесят','семьдесят','восемьдесят','девяносто');    sot: nazw = ('','сто','двести','тристо','четыресто','пятьсот','шестьсот','семьсот','восемьсот','девятьсот');    dd : nazw = ('','одинадцать','двенадцать','тринадцать','четырнадцать','пятнадцать',                       'шестнадцать','семнадцать','восемьнадцать','девятнадцать');  var    s,d,e,x : Integer;    st      : String;  Begin    Write('Введите число [0..1000] :'); Readln(x);   if x=1000 then st:='тысяча' else begin    s:= x div 100; x:=x mod 100; st:=sot[s];    d:= x div 10; e:=x mod 10;    if (d=1) and (e<>0) then st:=st+dd[e]                        else st:=st+des[d]+ed[e];   end;    writeln(st);     End.
0,0(0 оценок)
Ответ:
Кирюха33333
04.03.2021 00:41
#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;
}
0,0(0 оценок)
Полный доступ
Позволит учиться лучше и быстрее. Неограниченный доступ к базе и ответам от экспертов и ai-bota Оформи подписку
logo
Начни делиться знаниями
Вход Регистрация
Что ты хочешь узнать?
Спроси ai-бота