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> | |
#define task9_and_10 | |
using namespace std; | |
#ifdef task1 | |
int main() { | |
int n; | |
cin>>n; | |
int suma=0; | |
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 <cmath> | |
#include <iostream> | |
#include <bits/stdc++.h> | |
using namespace std; | |
int main() {//1 | |
int a; | |
cin >>a ; | |
if (a>0){ | |
int res1=a + 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
//Кочетов Кирилл Алексеевич РПО 24.3 | |
#include <iostream> | |
#include <cmath> | |
using namespace std; | |
int main() | |
{ | |
double a, b, P, S;// 1 | |
cin >> a >> b; | |
P=2*(a+b); | |
S=a*b; |
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
''' | |
#тема myList | |
#for index in range(len(mylist)): | |
# print(mylist[index],end=' ') | |
#for element in mylist: | |
# if element==5: | |
# print(element, end=' ') | |
#Список |
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
''' | |
row == col | |
#(0. 1 . 2) | |
for i in range(3): # строка | |
for j in range(3): # столбец | |
print("+",end=' ') | |
print() | |
for i in range(10): |
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 | |
a= int(input("Введите любое десятизначное число-> ")) | |
max = 9 | |
min = 0 | |
while a > 0: | |
f = a % 10 | |
if f < max: | |
max = f | |
if f > min: | |
min = f |
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
итератор - это | |
range(start stop step) | |
for - | |
for i in range(5): | |
print(i, end=' ') | |
strName = "Стас" | |
for sim in strName: | |
print(sim,end=' ') |
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 | |
''' | |
n=0 | |
a=1 | |
while n>=0: | |
n=int(input("введите число ")) | |
a+=n | |
print(a) | |
''' | |
#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
# Задача 1 | |
B=int(input("Начало диопозона " )) | |
E=int(input('Конец Диопозона ')) | |
while B < E: | |
B += 1 | |
if B %7 == 0: | |
print(f"Bот то число {B}") | |
elif B == E: | |
break | |
B += 1 |
NewerOlder