1)
#include <iostream>
using namespace std;
void draw_square(int n)
{
for(int y = 0; y < n; y++)
{
for (int x = 0; x < n; x++)
cout << "*";
cout << endl;
}
}
int main()
{
int n;
cin >> n;
draw_square(n);
return 0;
}
2)
#include <iostream>
using namespace std;
void drawNumbers(int a)
{
while(a > 0)
{
cout << a%10 << endl;
a /= 10;
}
}
int main()
{
int a;
cin >> a;
drawNumbers(a);
return 0;
}
3)
#include <iostream>
using namespace std;
int main()
{
//можно гораздо быстрей, но мне лень
int a;
cin >> a;
for(int i = 1; i <= a; i++) if(a%i==0) cout << i << " ";
return 0;
}
4)
#include <iostream>
using namespace std;
void procedure(int a)
{
int b = a;
int c = 1;
while(b > 0) {c *= 10; b/=10;}
while(c > 1)
{
cout << (a%c)/(c/10) << endl;
c /= 10;
}
}
int main()
{
int a;
cin >> a;
procedure(a);
return 0;
}<span>
</span>
Program z1;
var d1,d2,a :integer;
r1,r2:real;
begin
writeln('Введите диаметры');
readln(d1,d2);
r1:=d1/2;
r2:=d2/2;
if r1>r2 then
p:=pi*sqr(r1)-pi*sqr(r2);
writeln('первая окружность-внешняя, p=',p:8:3);
else
p:=pi*sqr(r2)-pi*sqr(r1);
writeln('вторая окружность-внешняя, p=',p:8:3);
end.
Ответ:Смотря в какой программе, если в paint, то сделать ровную линию. Если в фотошопе, то сделать ровную картинку!
Program kol_vo_elementov;
var a, b, p:real;
begin
writeln('Введите число');
readln(a);
b:=sqrt(a);
p:=4*b;
writeln('b=',b);
writeln('p=',p);
end.