The program should find the integer and the remainder using only additions and subtractions. When a residue appears, the program gives the following, although it works fine without remainder (for example, 15 by 3 divides normally) 
Here is the code:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Training { class cmon { public int num; public int k, count; public void enter() { Console.Write("Введите делимое: "); num = Convert.ToInt32(Console.ReadLine()); Console.Write("Введите делитель: "); k = Convert.ToInt32(Console.ReadLine()); } public void del() { do { num -= k; count++; } while (num != 0); } public void print() { Console.WriteLine("Целое: " + count); Console.WriteLine("Остаток: " + num); } } class Program { static void Main(string[] args) { cmon h = new cmon(); h.enter(); h.del(); h.print(); Console.ReadKey(); } } }
while(num > 0)and after the cycle, if the remainder is less than zero, you need to add back the divider. - Igor