Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace CSLight
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- Console.Write("Введите кол-во картинок в одном ряду: ");
- int countInRow = Convert.ToInt32(Console.ReadLine());
- Console.Write("Введите общее кол-во картинок: ");
- int countAll = Convert.ToInt32(Console.ReadLine());
- int countRow = countAll / countInRow;
- int remainderOfDivision = countAll % countInRow;
- Console.WriteLine($"Кол-во полностью заполненных рядов: {countRow}\nКол-во оставшихся картинок в последнем ряду: {remainderOfDivision}");
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment