Предмет: Информатика, автор: mudruymerc1p

Напечатать все целые числа от a до b включительно, кратные некоторому
числу c. Числа a, b, c - целые числа, вводит пользователь.


Аноним: язык какой?
mudruymerc1p: Составление циклических алгоритмов
Аноним: ))) питон, паскаль, си++?
Аноним: язык программирования, на котором писать код на Составление циклических алгоритмов

Ответы

Автор ответа: NaaMan
0

Программа на языке Python:

#! /usr/bin/env python3

#! encoding: utf-8

a = int( input('a: ' ) )

b = int( input('b: ' ) )

c = int( input('c: ' ) )

for i in range(a, b+1):

   if i % c == 0:

       print(i, end='  ')

print()

Объяснение:

Программа запрашивает у пользователя три числа а, b, c. Затем, с помощью цикла она перебирает все числа от меньшего a до большего b, и если они кратны числу с, выводит их на экран.

Программа написана без обработки ошибок, поэтому за правильностью ввода данных должен следить сам пользователь.

Результат работы программы - на скриншоте.

Приложения:
Похожие вопросы
Предмет: Английский язык, автор: Аноним
Предмет: Английский язык, автор: 98niknat
Прочитайте текст. Преобразуйте слова, напечатанные в скобках, так чтобы они грамматически и лексически соответствовали содержанию текста. Некоторые слова могут оставаться без изменения.

Housed in specialist accommodation, the Faculty has some of the finest train in the country. The staff are of the highest calibre, combine industrial and commercial expertise with to extend teaching experience in both Further and Higher Education.

The Faculty’s work covers all areas of personal and hospitality services from Food Production to Care. Full-time courses are provided at Craft, Supervisory and Management levels in Hotel Management, Catering, Beauty Therapy, Care and Hairdressing. The Faculty is also ___________respond for all Art tuition including the BTEC First Diploma and the Foundation Studies in Art course.

There is also a wide range of part-time, day release, block release, and leisure courses in associated subjects.

All the ____________ (vocation) bourses provide ____________ (value) work experience through industrial placements. Additional realistic work experience is provided in the excellent training rooms, such as Silver Service and Fast Food Restaurants, Bakery, Beauty and Hairdressing Salons, Computer Rooms, Training Kitchens, Art and Textile Studios.

The Faculty enjoys an international reputation and recruits many students from overseas. It ____________ (regular) enjoys success in national _____________ (compete) in Bakery, Food Preparation, Hotel Management, Hairdressing and Beauty. We are the leaders in offering the National Vocational Qualification in Catering, Hairdressing, Graphics.

We have special courses in all areas, our particular success this session with the Basic Food Handling Certificate.
Предмет: Английский язык, автор: альбина43