Advertisement
MustyElbow

WorkWithPictures

Aug 26th, 2023
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.74 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace WorkWithPictures
  8. {
  9.     internal class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int pictruresInRow = 3;
  14.             int totalPictures = 52;
  15.             int totalRows;
  16.             int outOfRangePictures;
  17.  
  18.             totalRows = totalPictures / pictruresInRow;
  19.             outOfRangePictures = totalPictures - (totalRows * pictruresInRow);
  20.  
  21.             Console.WriteLine($"Количество полностью заполненных рядов {totalRows}");
  22.             Console.WriteLine($"Картинок сверх меры {outOfRangePictures}");
  23.         }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement