Advertisement
Guest User

Osztóprogram

a guest
Nov 14th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.72 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 Osztoprogram
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             Console.WriteLine("Számláló:");
  14.             int a = int.Parse(Console.ReadLine());
  15.             Console.WriteLine("Nevező:");
  16.             int b = int.Parse(Console.ReadLine());
  17.  
  18.             int c = (a / b);
  19.             Console.WriteLine("A hányados számláló/nevező szám esetén " + c);
  20.            
  21.  
  22.             double d = (double)b / a;
  23.             Console.WriteLine("A hányados nevező/számláló szám esetén " + d);
  24.             Console.ReadKey();
  25.  
  26.  
  27.  
  28.         }
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement