Ночь-Дочь-Доль-Даль-Дань-День
Program n1;
var i,sum: integer;
begin
sum:=0;
for i:=100 to 999 do if i mod 47=43 then sum:=sum+i;
write(sum);
end.
Я так понимаю из задания вы это хотели.
В следующий раз самостоятельно хоть попытайтесь сделать,и приложите ваше решение к вопросу.
#include<iostream>;
using namespace std;
int main()
{
int n;
float height, width,square=0;
cout << "pls enter count rectangle" << endl;
while (true) //Бесконе4ный цикл
{
cin >> n;
if (n <= 10 && n > 0)//как нашли-выходим из цикла
break;
}
cout << "pls enter height" << endl;
cin >> height;
cout << "pls enter width" << endl;
cin >> width;
cout << endl;
for (int i = 0; i < n; i++)
{
square = square + (height * width);
}
cout <<"your answer : "<< square << endl;
system("pause");
return 0;
}
29₁₀ = X₂
29 / 2 =14 / 2 = 7 / 2 = 3 / 2 =1 / 2
1 0 1 1 1
11101₂=29₁₀
21₁₀ = X₈
21 / 8 = 2 / 8
5 2
25₈ = 21₁₀
101111₂ =X₁₀
₅ ₄ ₃ ₂ ₁ ₀
1 0 1 1 1 1₂ = 2^5 + 2^3 + 2^2 +2+1=32+8+4+2+1=47₁₀
Program abc;Const n=3; m=3;Var a:array[1..n,1..m] of integer; b,y,i,j,sum:integer; srd:real; Begin Writeln('Введите числа массива: '); For i:=1 to n do For j:=1 to m do Begin Write('a[',i,',',j,']= '); Readln(a[i,j]); if a[i,j]>0 then begin sum:=sum+a[i,j]; inc(b); end else If a[i,j]<0 then Inc(y); End; If sum>0 then begin srd:=sum/1 b; Writeln('Среднее =',srd); end else Writeln('Нет положительных членов массива'); If y>0 then begin Writeln('Количество отрицательных элементов =',y); end else Writeln('Нет отрицательных членов массива');End.