#ответ на вопрос 1
print("Первый дом.")
n1 = int(input("Количество этажей : "))
h1 = float(input("Высота комнаты : "))
print("Второй дом.")
n2 = int(input("Количество этажей : "))
h2 = float(input("Высота комнаты : "))
H1 = n1*h1
H2 = n2*h2
if H1>H2:
print("Дом первый выше чем второй дом")
elif H1<H2:
print("Дом второй выше чем первый дом")
else:
print("Высота обоих домов равна")
#ответ на вопрос 2
h = float(input("В часах : "))
m = float(input("В минутах : "))
h = h * 60
if h>m:
print("Первый отрезок времени больше")
elif m>h:
print("Второй отрезок времени больше")
else:
print("Оба равны")
#ответ на вопрос 3
a = float(input("a : "))
b = float(input("b : "))
if a/4 == b:
print("True")
else:
print("False")
#ответ на вопрос 4
a = float(input("a : "))
b = float(input("b : "))
if a >= b*4:
print("True")
else:
print("False")
#ответ на вопрос 5
a = float(input("a : "))
b = float(input("b : "))
c = float(input("c : "))
if a >= b*c:
print("True")
else:
print("False")
Объяснение:
#include <stdio.h>
#include <windows.h>
#define _MAX_STRING_SIZE_ 100
int main()
{
SetConsoleOutputCP(65001);
char str[_MAX_STRING_SIZE_];
scanf("%[^\n]%*c", str);// читает строку с пробелами
int counter = 0;
for(int letter = -96; letter <= -17; letter++)// проверка первого слова // а = -96, я = -17
if(str[0] == letter)
counter++;
for(int i = 0; i < _MAX_STRING_SIZE_ - 1; i++)
if(str[i] == ' ')
for(int letter = -96; letter <= -17; letter++) // а = -96, я = -17
if((int)str[i + 1] == letter)
counter++;
printf("%d", counter);
return 0;
}