3:
var a,b,c,d,e,f,g:real;
begin
write('Введите сумму наличных средств (руб): '); readln(a);
write('Введите стоимость 1 кг конфет (руб): '); readln(b);
write('Введите массу конфет (кг): '); readln(c);
write('Введите стоимость 1 кг яблок (руб): '); readln(d);
write('Введите массу яблок (кг): '); readln(e);
f := b*c + d*e;
g := a - f;
writeln('Стоимость покупки составит ', f:0:2, ' руб.');
writeln('Сдача ', g:0:2, ' руб.');
end.
4:
var a:real;
begin
write('Введите длину куба: '); readln(a);
writeln('Объём куба = ', a*a*a:0:2);
writeln('Площадь поверхности куба = ', 6*a*a:0:2);
end.
#include<iostream>
#include<cmath>
void main() {
char ch1, ch2;
int vol1, vol2;
std::cin >> ch1 >> vol1;
std::cin >> ch2 >> vol2;
if abs(ch1 - ch2) <= 2) && (abs(vol1 - vol2) <= 2)) && ((ch1 != ch2) && (vol1 != vol2))) && !((abs(ch1 - ch2)==1) && (abs(vol1-vol2))==1)) std::cout << "Possible";
else
std::cout << "Impossible";
}
3)
#include<iostream>
using namespace std;
void main() {
int n,m;
cin >> n,m;
cout<<n;
for(int i=n;i<=m;i++)
cout<<i+2;
}
4)
#include <iostream>
using namespace std; void main(){
int mass[2][4] //размерность своего массива вписывай.
{
{ 1, 2, 3, 4 }, //вписывай свои числа.
{ 1, 2, 3, 4 }
};
for (int i=0 ; i<2;++i)
{
for (int j=0 ; j<4;++j)
{
if(mass[i][j]<0)
cout<<mass[i][j];
}
}
system("pause");
}