Advertisement
Guest User

stettlermate

a guest
Apr 1st, 2015
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.29 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace ConsoleApplication1
  7. {
  8.     class muvelet
  9.     {
  10.         public static float osszead(int x, int y)
  11.         {
  12.             float osszeadas=x+y;
  13.             return osszeadas;
  14.         }
  15.         public static float kivon(int x, int y)
  16.         {
  17.             float kivonas=x-y;
  18.             return kivonas;
  19.         }
  20.         public static float szoroz(int x, int y)
  21.         {
  22.             float szorzas=x*y;
  23.             return szorzas;
  24.         }
  25.         public static float oszt(int x, int y)
  26.         {
  27.             float osztas=x/y;
  28.             return osztas;
  29.         }
  30.         public static void Koszon()
  31.         {
  32.             Console.WriteLine("Szia!");
  33.         }
  34.     }
  35.     class Program
  36.     {
  37.        
  38.         static void Main(string[] args)
  39.         {
  40.             Console.WriteLine("Irja be az x és y értékét!:");
  41.             int x=Convert.ToInt32(Console.ReadLine());
  42.             int y=Convert.ToInt32(Console.ReadLine());
  43.             Console.WriteLine(muvelet.osszead(x,y));
  44.             Console.WriteLine(muvelet.kivon(x, y));
  45.             Console.WriteLine(muvelet.szoroz(x, y));
  46.             Console.WriteLine(muvelet.oszt(x, y));
  47.             Console.ReadKey();
  48.         }
  49.     }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement