This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Зад 1 | |
number=int(input("Введите число: ")) | |
summ=0 | |
begin=1 | |
summ1=0 | |
for begin in range(number): | |
summ+=1 | |
summ1+=summ | |
print(summ1) | |
# Зад 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Зад 6 | |
number=int(input('Введите десятизначное число: ')) | |
max=9 | |
min=0 | |
while number > 0: | |
T=number%10 | |
if T < max: | |
max=T | |
if T > min: | |
min=T |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1 квадраты | |
number=int(input("Введите число: ")) | |
for row in range(number): | |
for col in range(number): | |
print("+", end=' ') | |
print() | |
print(f"\n") | |
for row in range(number): | |
for col in range(number): | |
if row == 0 or col == 0 or row == number - 1 or col == number - 1: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1 ромб сверху пустой | |
size =10 | |
for row in range(size-1): | |
for col in range(size-1): | |
if col + row == size - 6: | |
print("*", end=" ") | |
elif col == row + 4: | |
print("*", end=" ") | |
elif col == row - 4: # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cmath> | |
using namespace std; | |
int main() { | |
double a,b,s,p,c,v,s2,res1,res3,res2,res4,p1,p2,m1,m2,c1; | |
cin >> a >> b >> c; | |
//1 | |
s = 2 * (a + b); |
OlderNewer