
Напишите программу которая в диапазоне целых двухзначных чисел от c до b определяет количество
нечетных чисел кратных 3 и не начинающихся на 2 и 4

Ответы на вопрос

begin
b:=0;
writeln('Введите c');
readln(c);
writeln('Введите d');
readln(d);
for a:=c to d do
begin
if (a mod 2=1)and(a mod 3=0)and(a div 10<>2)and(a div 10<>4) then b:=b+1;
end;
writeln('Количество чисел равняется ',b);
end.



Program to Count Odd Numbers Divisible by 3
Here's a program in Python that determines the number of odd numbers divisible by 3 within the range of two-digit integers from c to b, excluding those that start with 2 or 4.
```python def count_odd_divisible_by_3(c, b): count = 0 for num in range(c, b+1): if num % 2 != 0 and num % 3 == 0 and str(num)[0] not in ['2', '4']: count += 1 return count
# Example usage c = 10 # Replace with the desired value b = 99 # Replace with the desired value result = count_odd_divisible_by_3(c, b) print("The number of odd numbers divisible by 3 and not starting with 2 or 4 is:", result) ```
You can replace the values of `c` and `b` with the desired range of two-digit integers to get the count of odd numbers divisible by 3 and not starting with 2 or 4 within that range.
Let me know if you need further assistance with this program!


Топ вопросов за вчера в категории Информатика








Последние заданные вопросы в категории Информатика
-
Математика
-
Литература
-
Алгебра
-
Русский язык
-
Геометрия
-
Английский язык
-
Химия
-
Физика
-
Биология
-
Другие предметы
-
История
-
Обществознание
-
Окружающий мир
-
География
-
Українська мова
-
Информатика
-
Українська література
-
Қазақ тiлi
-
Экономика
-
Музыка
-
Право
-
Беларуская мова
-
Французский язык
-
Немецкий язык
-
МХК
-
ОБЖ
-
Психология
-
Физкультура и спорт
-
Астрономия
-
Кыргыз тили
-
Оʻzbek tili