Advertisement
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 ConsoleApplication3
- {
- public class Prosta
- {
- protected int x;
- public Prosta(int xx)
- {
- x = xx;
- }
- public virtual void odl_zero()
- {
- Console.WriteLine(Math.Abs(x));
- }
- public class Plaszczyzna : Prosta
- {
- protected int y;
- public Plaszczyzna(int xx, int yy)
- : base(xx)
- {
- y = yy;
- }
- public override void odl_zero()
- {
- Console.WriteLine(Math.Sqrt(x * x + y * y));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement