CD это отражения ямок и горок которые кодируются 1 и 0| а различия в cd инфрокрасный лазер а в dvd красный лазер и в dvd меньшая длинна волны ёмкость DVD превосходит обычный cd
Var a:array[1..5,1..7] of integer;
i,j,kolpol,kolotr:integer;
respol,resotr:real;
begin
for j:=1 to 7 do begin
for i:=1 to 5 do begin
a[i,j]:=random(-50,50);
write(a[i,j]:4);
end;
writeln();
end;
for i:=1 to 5 do begin
respol:=0;
resotr:=0;
kolpol:=0;
kolotr:=0;
for j:=1 to 7 do begin
if a[i,j]>0 then begin
respol+=a[i,j];
kolpol+=1;
end
else if a[i,j]<0 then begin
resotr+=a[i,j];
kolotr+=1;
end;
end;
writeln('Среднее значение положительных чисел в ',i,' столбце=', respol/kolpol);
writeln('Среднее значение отрицательных чисел в ',i,' столбце=', resotr/kolotr);
end;
end.
Язык C++.
1. #include <iostream>
using namespace std;
int main() {
int i;
cout <<"Введите число: " << endl;
cin >> i;
cout << "Вы ввели число: " << i << endl;
}
2. #include <iostream>
using namespace std;
int main (){
int i;
cout << "Vvod" << endl;
cin >> i;
i %= 10;
if(i %2 != 0)
cout << "Нечетная" << endl;
else
cout << "Четная" << endl;
}
3. #include<iostream>
using namespace std;
int main (){
for(int k = 0; k<4; k++){
cout << "random number = " << rand() << endl;
}
}
4. #include <iostream>
using namespace std;
int main(){
int i,a,b,c;
cin >> i;
c = i%10;
b =(i/10)%10;
a = i/100;
if(i*i==a*a*a+b*b*b+c*c*c)
cout<<"Является."<<endl;
else
cout<<"Не является."<<endl;
}
5. #include <iostream>
#include <cmath>
const double pi = 3.1415926536;
using namespace std;
int main(){
float x = 0; cout << "Введите x: " << endl;
cin >> x;
cout << "y = " << sin((pi*(3.2+(sqrt(1+x))))/180)/abs(5*x) << endl;
}
Добавляем "pi" и делим на 180, чтобы "sin" был в градусах.
Блок-схемы смотри во вложении.
Num := (d + n) / 10;
sq := trunk(num) + 1;