Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace modulo_homework
- {
- class Program
- {
- static void Main(string[] args)
- {
- int a1 = 19;
- int a2 = 12;
- float modo = (a1 - (a1 / a2) * a2);
- float modo1 = (a1 % a2);//jako punkt odniesienia
- double modo3 = a1 - Math.Floor((double)a1 / a2) * a2;
- Console.WriteLine($"Modulo bez modulo: {modo}");
- Console.WriteLine($"Modulo: {modo1}");
- Console.WriteLine($"Inne modulo: {modo3}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment