Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions homework2.Task2/homework2.Task2.slnx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Solution>
<Project Path="homework2.Task2/homework2.Task2.csproj" />
</Solution>
47 changes: 47 additions & 0 deletions homework2.Task2/homework2.Task2/Class1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.Design;
using System.Runtime.InteropServices;
using System.Security.Cryptography.X509Certificates;
using System.Text;

namespace homework2.Task2
{
internal class BankAccount
{
private int balance;
public BankAccount(int balance)

{
balance = balance;
}
public void deposit (double amount)
{
balance +=(int) amount;
}
public void withdraw (double amount)
{
if (amount <= balance)
balance -= (int)amount;

else

Console.WriteLine("موجودی کافی نیست ");

Public void showbalance()
{
Console.WriteLine("balance");
}
Class program
{
static void Main()
bankaccount = new BankAccount(1000);

}




}
}
}
10 changes: 10 additions & 0 deletions homework2.Task2/homework2.Task2/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace homework2.Task2
{
internal class Program
{
static void Main(string[] args)
{

}
}
}
10 changes: 10 additions & 0 deletions homework2.Task2/homework2.Task2/homework2.Task2.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>