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

Labwork №1. 1)Write a program that calculates a volume of a cylinder.

Forex:

Radius (centimeters) = 5.5

Height of cylinder (cm) = 7

Result:

Volume of the cylinder is 665.23 cm.cube.

2)Write a program that calculates a total surface of a cylinder.

Forex:

Radius (centimeters) = 5.5

Height of cylinder (cm) = 7

Result:

Total surface of the cylinder is: 431.97 cm. square.

3)Write a program that converts pounds into kilograms. (1 pound = 405.9 grams)

Forex:

Enter weight in pounds = 5

Result:

5 pounds = 2.05 kg.

4)Write a program that calculates of series and parallel resistances in electricity.

Forex:

Enter values of R1 and R2 resistances:

R1 = 10 Ohm

R2 = 6 Ohm

Result:

Series resistances R1 and R2 is: 16 Ohm

Parallel resistances R1 and R2 is: 3.75 Ohm

5)Write a program that calculates ampere of electricity if resistance and voltage are given.

Forex:

Enter values of V(voltage) and R (resistance) of electricity:

V = 220 volt

R = 11Ohm

Result:

I = 20 Ampere

6)Write a program that calculates a distance between points given in map if there are 120 kilometers in one centimeter of point.

Forex:

Enter the distance of points in map (in centimeters) : 120

Result:

Then the real distance is : 1440 km.

7)Write a program that calculates a cost of journey with a car.

Forex:
Distance from point A to point B(in km) : 67 km

Car’s fuel consumption for 100 km: 10 litters

Cost of a fuel (92 or 93 type): 110 tenge

Result:

Total cost of journey there and back: 1474 tenge

8)Write a program that calculates a speed of a person who runs some distance.

Forex:

Enter a distance (meters) = 1000 m.

Enter a time he spent to run (mins and seconds) = 3.25

(3.25 = 3 мin 25 sec = 205 sec)

Result:

His speed is = 17.56 km/hour

○чень нужн●!П̰о̰ж̰а̰л̰у̰й̰с̰т̰а̰

👇
Открыть все ответы
Ответ:
emphasisone
emphasisone
12.01.2023
Var a:array[1..100,1..100] of integer; i,j,n,m,max,min:integer; begin write ('Введите количество строк: '); read(n); writeln; write ('Введите количество элементов в строке: '); read(m); writeln; writeln('Введите массив: '); for i:=1 to n do begin for j:=1 to m do begin write(' a[',i,',',j,']='); read(a[i,j]); end; writeln; end; writeln; writeln('Исходный массив: '); for i:=1 to n do begin for j:=1 to m do write(a[i,j],' '); writeln; end; writeln; writeln('Конечный массив: '); for i:=1 to n do begin min:=a[i,1]; max:=a[i,1]; for j:=2 to m do begin if (min>a[i,j]) then min:=a[i,j]; if (max
4,5(57 оценок)
Ответ:
123abcde6
123abcde6
12.01.2023
// PascalABC.Net 3.0, сборка 1066
var
  s, wd: string;
  n, pt: integer;

begin
  Write('Введите строку: ');Readln(s);
  n := Length(s); pt := 1;
  repeat
    // Пропускаем все символы до первого непробельного
    while pt <= n do
      if s[pt] = ' ' then Inc(pt) else break;
    if pt <= n then begin
      // Выделяем очередное слово
      wd := '';
      while pt <= n do
        if s[pt] <> ' ' then begin wd := wd + s[pt]; Inc(pt) end
        else break;
      if (wd <> '') and (LowCase(wd[1]) in ['м'..'я']) then Writeln(wd)
    end
  until pt > n;
end.

Тестовое решение:
Введите строку: **А роза    упала   на    лапу Азора    **
роза
упала
на

А вот так версия 3.0 позволяет решить задачу "по-современному":

// PascalABC.Net 3.0, сборка 1066
begin
  var s:=ReadString('Введите строку: ');
  Writeln('Результат: ',s.ToWords(' ').Where(x->x[1] in ['м'..'я']))
end.

Тестовое решение:
Введите строку:  **А роза    упала   на    лапу Азора    **
Результат: [роза,упала,на]
4,4(9 оценок)
Это интересно:
Новые ответы от MOGZ: Информатика
logo
Вход Регистрация
Что ты хочешь узнать?
Спроси Mozg
Открыть лучший ответ