М
Молодежь
К
Компьютеры-и-электроника
Д
Дом-и-сад
С
Стиль-и-уход-за-собой
П
Праздники-и-традиции
Т
Транспорт
П
Путешествия
С
Семейная-жизнь
Ф
Философия-и-религия
Б
Без категории
М
Мир-работы
Х
Хобби-и-рукоделие
И
Искусство-и-развлечения
В
Взаимоотношения
З
Здоровье
К
Кулинария-и-гостеприимство
Ф
Финансы-и-бизнес
П
Питомцы-и-животные
О
Образование
О
Образование-и-коммуникации

Скажите, , эти программы правильные? (название проги - номер ))program four; uses crt; var a, b, c, d, kop, rub: real; begin clrscr; writeln('sena 1 kg fruktov'); readln(a); b: =0; c: =0; d: =1000; repeat c: =c+b; writeln('ves fructa ne bolee 150 g'); чreadln(b); d: =d-b; until d< 0; c: =c/1000; a: =a*c; rub: =trunc(a); kop: =(frac(a))*100; writeln(rub: 4: 0,' rub ',kop: 4: 0,' kop'); readkey; end.​program two; uses crt; var a, b, c, d, n: integer; begin clrscr; readln(a); readln(n); c: =0; a: =a*100; while (a> 0) do begin a: =a-(n*2); c: =c+1; end; d: =c div 24; writeln('vsego chasov = ', c); writeln('vsego dney = ', d); readkey; end.program three; uses crt; var a,b,c,chislo1,chislo2,chislo3,max: integer; function summa(n: integer): integer; var s: integer; begin s: =0; n: =abs(n); while n> 0 do begin s: =s+n mod 10; n: =n div 10; end; summa: =s; end; begin clrscr; write('a = '); readln(a); write('b = '); readln(b); write('c = '); readln(c); chislo1: =summa(a); chislo2: =summa(b); chislo3: =summa(c); writeln('chislo 1 = ',chislo1); writeln('chislo 2 = ',chislo2); writeln('chislo 3 = ',chislo3); if chislo1> chislo2 then max: =chislo1 else max: =chislo2; if chislo3> max then max: =chislo3; writeln('max = ',max); readkey; end.program five; uses crt; var b, c, i, j : integer; begin clrscr; c: =0; for i : =1 to 7 do begin for j : =1 to 24 do begin readln(b); if (b< 754)or(b> 771) then c: =c+1; end; end; writeln('davlenie ne sootvetstvovalo norme ',c,' chasov za nedelu'); readkey; end.

👇
Открыть все ответы
Ответ:
Luvizum
Luvizum
29.07.2022

#include <iostream>
using std::cout;
using std::endl;
#include <cstdlib>
using std::rand;
using std::srand;
#include <ctime>
using std::time;

int main()
{
    int a[12];

    for(int i = 0; i < 12; i++)
    {
        a[i] = rand() % 21;

        cout << a[i] << ' ';
    }
    cout << endl;

    int temp;
    for(int i = 0, j = 11; i < j; i++, j--)
    {
        temp = a[i];
        a[i] = a[j];
        a[j] = temp;
    }

    for(int i = 0; i < 12; i++)
    {
        cout << a[i] << ' ';
    }
    cout << endl;

   return 0;
}


Вмассиве из 12 целых положительных чисел от 0 до 20 поменять местами первый и последний элементы, вт
4,7(22 оценок)
Ответ:
Trolololo09
Trolololo09
29.07.2022

#include <iostream>
using std::cout;
using std::endl;
#include <cstdlib>
using std::rand;
using std::srand;
#include <ctime>
using std::time;

int main()
{
    int a[12];

    for(int i = 0; i < 12; i++)
    {
        a[i] = rand() % 21;

        cout << a[i] << ' ';
    }
    cout << endl;

    int temp;
    for(int i = 0, j = 11; i < j; i++, j--)
    {
        temp = a[i];
        a[i] = a[j];
        a[j] = temp;
    }

    for(int i = 0; i < 12; i++)
    {
        cout << a[i] << ' ';
    }
    cout << endl;

   return 0;
}


Вмассиве из 12 целых положительных чисел от 0 до 20 поменять местами первый и последний элементы, вт
4,8(44 оценок)
Это интересно:
Новые ответы от MOGZ: Информатика
logo
Вход Регистрация
Что ты хочешь узнать?
Спроси Mozg
Открыть лучший ответ