1
//Вводим a,b,c
Console.WriteLine(hello);
if(a == b || a==c || b==c){
Console.WriteLine("Треугольник равнобедренный");
}else{
Console.WriteLine("Треугольник НЕ равнобедренный");
}
2
int x1,x2,x3,x4;
int x;
//Вводим число x
x1 = (x - (x % 1000)) / 1000;
x2 = ((x - (x % 100)) - (x - (x % 1000))) / 100;
x3 = ((x - (x % 10)) - (x - (x % 100))) / 10;
x4 = x % 10;
if((x1 == 6) || (x1 == 9) || (x2 == 6) || (x2 == 9) || (x3 == 6) || (x3 == 9) || (x4 == 6) || (x4 == 9)){
Console.WriteLine("Входит");
}else{
Console.WriteLine("не входит");
}
3
float x,y,z;
// Вводим x,y,z
if(x >= 0,5 && x<=5,1) Console.WriteLine(x, " Входит");
if(y >= 0,5 && y<=5,1) Console.WriteLine(y, " Входит");
if(z >= 0,5 && z<=5,1) Console.WriteLine(z, " Входит");
4 задания к сожалению не понял
# Python 3.X
def fib_gen(x, y):
f1, f2 = x, y
yield 1
while True:
f3 = f1 + f2
yield f3
f1, f2 = f2, f3
nom, denom = fib_gen(1, 1), fib_gen(1, 2)
c = int(input('Сколько чисел напечатать? c = '))
for _ in range(0, c):
print('{}/{}'.format(next(nom), next(denom)))