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 Bankszaml
- {
- class bankszamla
- {
- double egyenleg;
- public bankszamla(double egyenleg)
- {
- this.egyenleg=egyenleg;
- }
- public double EGYENLEG
- {
- get { return egyenleg; }
- }
- public void noveles(double egyenleg)
- {
- this.egyenleg=+egyenleg;
- }
- public void csokkent (double osszeg)
- {
- if (osszeg>egyenleg)
- {
- osszeg=-egyenleg;
- bool true;
- }
- else
- {
- Console.WriteLine("Nincs eleg penz a szamlan");
- }
- }
- }
- class Program
- {
- static void Main(string[] args)
- {
- double osszeg=1000;
- Console.WriteLine("Bankszamlan levo osszeg 1000");
- bankszamla szamla=new bankszamla(osszeg);
- Console.WriteLine("A szamla egyenlege {0}", szamla.EGYENLEG);
- Console.WriteLine("A bevitt ertek 500 din");
- Console.WriteLine("A szamla egyenlege {0}", szamla.EGYENLEG);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement