fork download
  1. using static System.Console;
  2. using System;
  3.  
  4. public class Program {
  5. static Random r = new Random();
  6. static int x = r.Next(6, 11);
  7. static int y = r.Next(1, 6);
  8. public static void Main() {
  9. decimal a = x / y;
  10. WriteLine($"{x} / {y} = {a}");
  11. Teste();
  12. }
  13. public static void Teste() {
  14. decimal a = decimal.Divide(x, y);
  15. WriteLine($"{x} Divide {y} = {a}");
  16. }
  17. }
  18.  
  19. //https://pt.stackoverflow.com/q/125476/101
Success #stdin #stdout 0.03s 16536KB
stdin
Standard input is empty
stdout
8 / 1 = 8
8 Divide 1 = 8