2010-04-26 - C# calculator
Dim a As Double
Dim ch As String
Private Sub Command1_Click()
Text1.Text = Text1.Text & "1"
End Sub
Private Sub Command10_Click()
Text1.Text = Text1.Text & "0"
End Sub
Private Sub Command12_Click()
Text1.Text = Text1.Text & "."
End Sub
Private Sub Command13_Click()
a = Val(Text1.Text)
ch = "/"
Text1.Text = ""
End Sub
Private Sub Command14_Click()
a = Val(Text1.Text)
ch = "*"
Text1.Text = ""
End Sub
Private Sub Command15_Click()
a = Val(Text1.Text)
ch = "-"
Text1.Text = ""
End Sub
Private Sub Command16_Click()
a = Val(Text1.Text)
ch = "+"
Text1.Text = ""
End Sub
Private Sub Command19_Click()
Text1.Text = ""
End Sub
Private Sub ...
Dim ch As String
Private Sub Command1_Click()
Text1.Text = Text1.Text & "1"
End Sub
Private Sub Command10_Click()
Text1.Text = Text1.Text & "0"
End Sub
Private Sub Command12_Click()
Text1.Text = Text1.Text & "."
End Sub
Private Sub Command13_Click()
a = Val(Text1.Text)
ch = "/"
Text1.Text = ""
End Sub
Private Sub Command14_Click()
a = Val(Text1.Text)
ch = "*"
Text1.Text = ""
End Sub
Private Sub Command15_Click()
a = Val(Text1.Text)
ch = "-"
Text1.Text = ""
End Sub
Private Sub Command16_Click()
a = Val(Text1.Text)
ch = "+"
Text1.Text = ""
End Sub
Private Sub Command19_Click()
Text1.Text = ""
End Sub
Private Sub ...
2010-04-23 - OOP BIE DAALT DELGVVRIIN PROGRAMM УДАМШИЛ
#include
#include
#include
#include
#include
#include
/*class Customer
{ public:
static float money=0;
Customer(float g){ money=money+g; }
void Display(){ cout<<" "<<"TANII NIIT TOLOX MONGO="<};*/
class Shop
{ protected:
char *goods_name; int count; int price;
public:
Shop(char *bname="no", int bcount=0,int bprice=0) { goods_name=new char[strlen(bname)+1]; strcpy(goods_name,bname); count=bcount; price=bprice; }
};
class Grosery:public Shop
{ char *where_made, *start_date, *end_date; float money1; static float money;
public:
Grosery(char *where_made1="no", char *start_date1="no", char *end_date1="no" ,char *bname="no", int bcount=0,int bprice=0):Shop(bname,bcount,bprice){ where_made = new char[strlen(where_made1)+1]; strcpy(where_made,where_made1); start_date = new char[strlen(start_date1)+1]; strcpy(start_date,start_date1); end_date = new char[strlen(end_date1)+1]; strcpy(end_date,end_date1); }
void Display(int k){ cout<<<"."; cout<<<" "; cout<<<" "; cout<<<" "; cout<<<" "; cout<<<" "; cout<<<"
";k++;}
void tootsoo1(int w){ count=count-w; money1=(price*0.2+price)*w; money=money+money1; }
void show(){ cout<<" "<<"total due="< void b();
};
void Grosery::b() { fstream out("TAILAN_XVNC.TXT",ios::in | ios::out); cout<<" "<<"FILE-ruu ugugdul bichih gej bna. "; for(int m=1;m<=12;m++) { out<<<" "; out<<<" "; out<<<" "; out<<<" "; out<<<" "; out<<<" ";} out.close();}
float Grosery::money=0;
class BookShop:public Shop
{ char *actor, *xevle_date; int k;
public:
float money2;static float money;
BookShop(char *actor1="no", char *xevle_date1="no",char *bname="no", int bcount=0,int bprice=0):Shop(bname,bcount,bprice){ actor = new char[strlen(actor1)+1]; strcpy(actor,actor1); xevle_date =new char[strlen(xevle_date1)+1]; strcpy(xevle_date,xevle_date1); }
void Display(int k){ cout<<<"."<<" "<<<" "<<<" "<
#include
#include
#include
#include
#include
/*class Customer
{ public:
static float money=0;
Customer(float g){ money=money+g; }
void Display(){ cout<<" "<<"TANII NIIT TOLOX MONGO="<};*/
class Shop
{ protected:
char *goods_name; int count; int price;
public:
Shop(char *bname="no", int bcount=0,int bprice=0) { goods_name=new char[strlen(bname)+1]; strcpy(goods_name,bname); count=bcount; price=bprice; }
};
class Grosery:public Shop
{ char *where_made, *start_date, *end_date; float money1; static float money;
public:
Grosery(char *where_made1="no", char *start_date1="no", char *end_date1="no" ,char *bname="no", int bcount=0,int bprice=0):Shop(bname,bcount,bprice){ where_made = new char[strlen(where_made1)+1]; strcpy(where_made,where_made1); start_date = new char[strlen(start_date1)+1]; strcpy(start_date,start_date1); end_date = new char[strlen(end_date1)+1]; strcpy(end_date,end_date1); }
void Display(int k){ cout<
void show(){ cout<<" "<<"total due="< void b();
};
void Grosery::b() { fstream out("TAILAN_XVNC.TXT",ios::in | ios::out); cout<<" "<<"FILE-ruu ugugdul bichih gej bna. "; for(int m=1;m<=12;m++) { out<
float Grosery::money=0;
class BookShop:public Shop
{ char *actor, *xevle_date; int k;
public:
float money2;static float money;
BookShop(char *actor1="no", char *xevle_date1="no",char *bname="no", int bcount=0,int bprice=0):Shop(bname,bcount,bprice){ actor = new char[strlen(actor1)+1]; strcpy(actor,actor1); xevle_date =new char[strlen(xevle_date1)+1]; strcpy(xevle_date,xevle_date1); }
void Display(int k){ cout<