Calculator ap

Crystal heart

New member
Joined
Jul 18, 2014
Messages
1
Programming Experience
3-5
Hi all,
I am developing calculator app using C#.I have successfuly implemented its standard arithmetic functions but a bit trapped in implementing scientific functions such as sin,cos.tan etc.
I take an operand1,then operator and finally second opernad to workout arithmetic calculations.In the very first attempt to do scientific calculation i for the sake of programme format first takes input followed by sin/cos/tan etc and then out result.
Here is my code:

C#:
[COLOR=#000000]        using [/COLOR][COLOR=#660066]System[/COLOR][COLOR=#666600];[/COLOR]
[LIST]
[*][COLOR=#000000]using [/COLOR][COLOR=#660066]System[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Collections[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Generic[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000000]using [/COLOR][COLOR=#660066]System[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]ComponentModel[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000000]using [/COLOR][COLOR=#660066]System[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Data[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000000]using [/COLOR][COLOR=#660066]System[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Drawing[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000000]using [/COLOR][COLOR=#660066]System[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Linq[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000000]using [/COLOR][COLOR=#660066]System[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Text[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000000]using [/COLOR][COLOR=#660066]System[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Windows[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Forms[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000000]namespace [/COLOR][COLOR=#660066]Calculator[/COLOR]
[*][COLOR=#666600]{[/COLOR]
[*][COLOR=#000088]public[/COLOR][COLOR=#000088]partial[/COLOR][COLOR=#000088]class[/COLOR][COLOR=#660066]Form1[/COLOR][COLOR=#666600]:[/COLOR][COLOR=#660066]Form[/COLOR]
[*][COLOR=#666600]{[/COLOR]
[*][COLOR=#000088]string[/COLOR][COLOR=#000000] input [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000088]string[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Empty[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000088]string[/COLOR][COLOR=#000000] operand1 [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000088]string[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Empty[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000088]string[/COLOR][COLOR=#000000] operand2 [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000088]string[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Empty[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000088]char[/COLOR][COLOR=#000000] operaton[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000088]double[/COLOR][COLOR=#000000] result [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#006666]0.0[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000088]public[/COLOR][COLOR=#660066]Form1[/COLOR][COLOR=#666600]()[/COLOR]
[*][COLOR=#666600]{[/COLOR]
[*][COLOR=#660066]InitializeComponent[/COLOR][COLOR=#666600]();[/COLOR]
[*][COLOR=#666600]}[/COLOR]
[*][COLOR=#000088]private[/COLOR][COLOR=#000088]void[/COLOR][COLOR=#000000] one_Click[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000088]object[/COLOR][COLOR=#000000] sender[/COLOR][COLOR=#666600],[/COLOR][COLOR=#660066]EventArgs[/COLOR][COLOR=#000000] e[/COLOR][COLOR=#666600])[/COLOR]
[*][COLOR=#666600]{[/COLOR]
[*][COLOR=#000088]this[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]textBox1[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Text[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]" "[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000000]            input [/COLOR][COLOR=#666600]+=[/COLOR][COLOR=#008800]"1"[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000088]this[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]textBox1[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Text[/COLOR][COLOR=#666600]+=[/COLOR][COLOR=#000000] input[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#666600]}[/COLOR]
[*][COLOR=#000088]private[/COLOR][COLOR=#000088]void[/COLOR][COLOR=#000000] two_Click[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000088]object[/COLOR][COLOR=#000000] sender[/COLOR][COLOR=#666600],[/COLOR][COLOR=#660066]EventArgs[/COLOR][COLOR=#000000] e[/COLOR][COLOR=#666600])[/COLOR]
[*][COLOR=#666600]{[/COLOR]
[*][COLOR=#000088]this[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]textBox1[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Text[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]" "[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000000]            input [/COLOR][COLOR=#666600]+=[/COLOR][COLOR=#008800]"2"[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000088]this[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]textBox1[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Text[/COLOR][COLOR=#666600]+=[/COLOR][COLOR=#000000] input[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#666600]}[/COLOR]
[*][COLOR=#000088]private[/COLOR][COLOR=#000088]void[/COLOR][COLOR=#000000] three_Click[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000088]object[/COLOR][COLOR=#000000] sender[/COLOR][COLOR=#666600],[/COLOR][COLOR=#660066]EventArgs[/COLOR][COLOR=#000000] e[/COLOR][COLOR=#666600])[/COLOR]
[*][COLOR=#666600]{[/COLOR]
[*][COLOR=#000088]this[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]textBox1[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Text[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]" "[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000000]            input [/COLOR][COLOR=#666600]+=[/COLOR][COLOR=#008800]"3"[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000088]this[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]textBox1[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Text[/COLOR][COLOR=#666600]+=[/COLOR][COLOR=#000000] input[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#666600]}[/COLOR]
[*][COLOR=#000088]private[/COLOR][COLOR=#000088]void[/COLOR][COLOR=#000000] four_Click[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000088]object[/COLOR][COLOR=#000000] sender[/COLOR][COLOR=#666600],[/COLOR][COLOR=#660066]EventArgs[/COLOR][COLOR=#000000] e[/COLOR][COLOR=#666600])[/COLOR]
[*][COLOR=#666600]{[/COLOR]
[*][COLOR=#000088]this[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]textBox1[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Text[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]" "[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000000]            input [/COLOR][COLOR=#666600]+=[/COLOR][COLOR=#008800]"4"[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000088]this[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]textBox1[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Text[/COLOR][COLOR=#666600]+=[/COLOR][COLOR=#000000] input[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#666600]}[/COLOR]
[*][COLOR=#000088]private[/COLOR][COLOR=#000088]void[/COLOR][COLOR=#000000] five_Click[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000088]object[/COLOR][COLOR=#000000] sender[/COLOR][COLOR=#666600],[/COLOR][COLOR=#660066]EventArgs[/COLOR][COLOR=#000000] e[/COLOR][COLOR=#666600])[/COLOR]
[*][COLOR=#666600]{[/COLOR]
[*][COLOR=#000088]this[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]textBox1[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Text[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]" "[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000000]            input [/COLOR][COLOR=#666600]+=[/COLOR][COLOR=#008800]"5"[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000088]this[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]textBox1[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Text[/COLOR][COLOR=#666600]+=[/COLOR][COLOR=#000000] input[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#666600]}[/COLOR]
[*][COLOR=#000088]private[/COLOR][COLOR=#000088]void[/COLOR][COLOR=#000000] six_Click[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000088]object[/COLOR][COLOR=#000000] sender[/COLOR][COLOR=#666600],[/COLOR][COLOR=#660066]EventArgs[/COLOR][COLOR=#000000] e[/COLOR][COLOR=#666600])[/COLOR]
[*][COLOR=#666600]{[/COLOR]
[*][COLOR=#000088]this[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]textBox1[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Text[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]" "[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000000]            input [/COLOR][COLOR=#666600]+=[/COLOR][COLOR=#008800]"6"[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000088]this[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]textBox1[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Text[/COLOR][COLOR=#666600]+=[/COLOR][COLOR=#000000] input[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#666600]}[/COLOR]
[*][COLOR=#000088]private[/COLOR][COLOR=#000088]void[/COLOR][COLOR=#000000] seven_Click[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000088]object[/COLOR][COLOR=#000000] sender[/COLOR][COLOR=#666600],[/COLOR][COLOR=#660066]EventArgs[/COLOR][COLOR=#000000] e[/COLOR][COLOR=#666600])[/COLOR]
[*][COLOR=#666600]{[/COLOR]
[*][COLOR=#000088]this[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]textBox1[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Text[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]" "[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000000]            input [/COLOR][COLOR=#666600]+=[/COLOR][COLOR=#008800]"7"[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000088]this[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]textBox1[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Text[/COLOR][COLOR=#666600]+=[/COLOR][COLOR=#000000] input[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#666600]}[/COLOR]
[*][COLOR=#000088]private[/COLOR][COLOR=#000088]void[/COLOR][COLOR=#000000] eight_Click[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000088]object[/COLOR][COLOR=#000000] sender[/COLOR][COLOR=#666600],[/COLOR][COLOR=#660066]EventArgs[/COLOR][COLOR=#000000] e[/COLOR][COLOR=#666600])[/COLOR]
[*][COLOR=#666600]{[/COLOR]
[*][COLOR=#000088]this[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]textBox1[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Text[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]" "[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000000]            input [/COLOR][COLOR=#666600]+=[/COLOR][COLOR=#008800]"8"[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000088]this[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]textBox1[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Text[/COLOR][COLOR=#666600]+=[/COLOR][COLOR=#000000] input[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#666600]}[/COLOR]
[*][COLOR=#000088]private[/COLOR][COLOR=#000088]void[/COLOR][COLOR=#000000] nine_Click[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000088]object[/COLOR][COLOR=#000000] sender[/COLOR][COLOR=#666600],[/COLOR][COLOR=#660066]EventArgs[/COLOR][COLOR=#000000] e[/COLOR][COLOR=#666600])[/COLOR]
[*][COLOR=#666600]{[/COLOR]
[*][COLOR=#000088]this[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]textBox1[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Text[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]" "[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000000]            input [/COLOR][COLOR=#666600]+=[/COLOR][COLOR=#008800]"9"[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000088]this[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]textBox1[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Text[/COLOR][COLOR=#666600]+=[/COLOR][COLOR=#000000] input[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#666600]}[/COLOR]
[*][COLOR=#000088]private[/COLOR][COLOR=#000088]void[/COLOR][COLOR=#000000] dot_Click[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000088]object[/COLOR][COLOR=#000000] sender[/COLOR][COLOR=#666600],[/COLOR][COLOR=#660066]EventArgs[/COLOR][COLOR=#000000] e[/COLOR][COLOR=#666600])[/COLOR]
[*][COLOR=#666600]{[/COLOR]
[*][COLOR=#000088]this[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]textBox1[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Text[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]" "[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000000]            input [/COLOR][COLOR=#666600]+=[/COLOR][COLOR=#008800]"."[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000088]this[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]textBox1[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Text[/COLOR][COLOR=#666600]+=[/COLOR][COLOR=#000000] input[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#666600]}[/COLOR]
[*][COLOR=#000088]private[/COLOR][COLOR=#000088]void[/COLOR][COLOR=#000000] zero_Click[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000088]object[/COLOR][COLOR=#000000] sender[/COLOR][COLOR=#666600],[/COLOR][COLOR=#660066]EventArgs[/COLOR][COLOR=#000000] e[/COLOR][COLOR=#666600])[/COLOR]
[*][COLOR=#666600]{[/COLOR]
[*][COLOR=#000088]this[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]textBox1[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Text[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]" "[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000000]            input [/COLOR][COLOR=#666600]+=[/COLOR][COLOR=#008800]"0"[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000088]this[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]textBox1[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Text[/COLOR][COLOR=#666600]+=[/COLOR][COLOR=#000000] input[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#666600]}[/COLOR]
[*][COLOR=#000088]private[/COLOR][COLOR=#000088]void[/COLOR][COLOR=#000000] clear_Click[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000088]object[/COLOR][COLOR=#000000] sender[/COLOR][COLOR=#666600],[/COLOR][COLOR=#660066]EventArgs[/COLOR][COLOR=#000000] e[/COLOR][COLOR=#666600])[/COLOR]
[*][COLOR=#666600]{[/COLOR]
[*][COLOR=#000088]this[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]textBox1[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Text[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]"0"[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000088]this[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]input [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000088]string[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Empty[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000088]this[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]operand1 [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000088]string[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Empty[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000088]this[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]operand2 [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000088]string[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Empty[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#666600]}[/COLOR]
[*][COLOR=#000088]private[/COLOR][COLOR=#000088]void[/COLOR][COLOR=#000000] plus_Click[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000088]object[/COLOR][COLOR=#000000] sender[/COLOR][COLOR=#666600],[/COLOR][COLOR=#660066]EventArgs[/COLOR][COLOR=#000000] e[/COLOR][COLOR=#666600])[/COLOR]
[*][COLOR=#666600]{[/COLOR]
[*][COLOR=#000000]            operand1 [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000000] input[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000000]            operaton [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]'+'[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000000]            input [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000088]string[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Empty[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#666600]}[/COLOR]
[*][COLOR=#000088]private[/COLOR][COLOR=#000088]void[/COLOR][COLOR=#000000] minus_Click[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000088]object[/COLOR][COLOR=#000000] sender[/COLOR][COLOR=#666600],[/COLOR][COLOR=#660066]EventArgs[/COLOR][COLOR=#000000] e[/COLOR][COLOR=#666600])[/COLOR]
[*][COLOR=#666600]{[/COLOR]
[*][COLOR=#000000]            operand1 [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000000] input[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000000]            operaton [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]'-'[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000000]            input [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000088]string[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Empty[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#666600]}[/COLOR]
[*][COLOR=#000088]private[/COLOR][COLOR=#000088]void[/COLOR][COLOR=#000000] mul_Click[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000088]object[/COLOR][COLOR=#000000] sender[/COLOR][COLOR=#666600],[/COLOR][COLOR=#660066]EventArgs[/COLOR][COLOR=#000000] e[/COLOR][COLOR=#666600])[/COLOR]
[*][COLOR=#666600]{[/COLOR]
[*][COLOR=#000000]            operand1 [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000000] input[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000000]            operaton [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]'*'[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000000]            input [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000088]string[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Empty[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#666600]}[/COLOR]
[*][COLOR=#000088]private[/COLOR][COLOR=#000088]void[/COLOR][COLOR=#000000] div_Click[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000088]object[/COLOR][COLOR=#000000] sender[/COLOR][COLOR=#666600],[/COLOR][COLOR=#660066]EventArgs[/COLOR][COLOR=#000000] e[/COLOR][COLOR=#666600])[/COLOR]
[*][COLOR=#666600]{[/COLOR]
[*][COLOR=#000000]            operand1 [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000000] input[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000000]            operaton [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]'/'[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000000]            input [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000088]string[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Empty[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#666600]}[/COLOR]
[*][COLOR=#000088]private[/COLOR][COLOR=#000088]void[/COLOR][COLOR=#000000] mod_Click[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000088]object[/COLOR][COLOR=#000000] sender[/COLOR][COLOR=#666600],[/COLOR][COLOR=#660066]EventArgs[/COLOR][COLOR=#000000] e[/COLOR][COLOR=#666600])[/COLOR]
[*][COLOR=#666600]{[/COLOR]
[*][COLOR=#000000]            operand1 [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000000] input[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000000]            operaton [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]'%'[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000000]            input [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000088]string[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Empty[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#666600]}[/COLOR]
[*][COLOR=#000088]private[/COLOR][COLOR=#000088]void[/COLOR][COLOR=#000000] sine_Click[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000088]object[/COLOR][COLOR=#000000] sender[/COLOR][COLOR=#666600],[/COLOR][COLOR=#660066]EventArgs[/COLOR][COLOR=#000000] e[/COLOR][COLOR=#666600])[/COLOR]
[*][COLOR=#666600]{[/COLOR]
[*][COLOR=#000000]            operand1 [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000000] input[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000000]            operaton [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]'s'[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000000]            input [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000088]string[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Empty[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#666600]}[/COLOR]
[*][COLOR=#000088]private[/COLOR][COLOR=#000088]void[/COLOR][COLOR=#000000] cosine_Click[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000088]object[/COLOR][COLOR=#000000] sender[/COLOR][COLOR=#666600],[/COLOR][COLOR=#660066]EventArgs[/COLOR][COLOR=#000000] e[/COLOR][COLOR=#666600])[/COLOR]
[*][COLOR=#666600]{[/COLOR]
[*][COLOR=#000000]            operand1 [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000000] input[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000000]            operaton [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]'c'[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000000]            input [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000088]string[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Empty[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#666600]}[/COLOR]
[*][COLOR=#000088]private[/COLOR][COLOR=#000088]void[/COLOR][COLOR=#000000] tan_Click[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000088]object[/COLOR][COLOR=#000000] sender[/COLOR][COLOR=#666600],[/COLOR][COLOR=#660066]EventArgs[/COLOR][COLOR=#000000] e[/COLOR][COLOR=#666600])[/COLOR]
[*][COLOR=#666600]{[/COLOR]
[*][COLOR=#000000]            operand1 [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000000] input[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000000]            operaton [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]'t'[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000000]            input [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000088]string[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Empty[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#666600]}[/COLOR]
[*][COLOR=#000088]private[/COLOR][COLOR=#000088]void[/COLOR][COLOR=#000000] equals_Click[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000088]object[/COLOR][COLOR=#000000] sender[/COLOR][COLOR=#666600],[/COLOR][COLOR=#660066]EventArgs[/COLOR][COLOR=#000000] e[/COLOR][COLOR=#666600])[/COLOR]
[*][COLOR=#666600]{[/COLOR]
[*][COLOR=#000000]            operand2 [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000000] input[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000088]double[/COLOR][COLOR=#000000] num1[/COLOR][COLOR=#666600],[/COLOR][COLOR=#000000] num2[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000088]double[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]TryParse[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000000]operand1[/COLOR][COLOR=#666600],[/COLOR][COLOR=#000088]out[/COLOR][COLOR=#000000] num1[/COLOR][COLOR=#666600]);[/COLOR]
[*][COLOR=#000088]double[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]TryParse[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000000]operand2[/COLOR][COLOR=#666600],[/COLOR][COLOR=#000088]out[/COLOR][COLOR=#000000] num2[/COLOR][COLOR=#666600]);[/COLOR]
[*][COLOR=#000088]if[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000000]operaton [/COLOR][COLOR=#666600]==[/COLOR][COLOR=#008800]'+'[/COLOR][COLOR=#666600])[/COLOR]
[*][COLOR=#666600]{[/COLOR]
[*][COLOR=#000000]                result [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000000] num1 [/COLOR][COLOR=#666600]+[/COLOR][COLOR=#000000] num2[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000000]               textBox1[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Text[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000000] result[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]ToString[/COLOR][COLOR=#666600]();[/COLOR]
[*][COLOR=#666600]}[/COLOR]
[*][COLOR=#000088]else[/COLOR][COLOR=#000088]if[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000000]operaton [/COLOR][COLOR=#666600]==[/COLOR][COLOR=#008800]'-'[/COLOR][COLOR=#666600])[/COLOR]
[*][COLOR=#666600]{[/COLOR]
[*][COLOR=#000000]                result [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000000] num1 [/COLOR][COLOR=#666600]-[/COLOR][COLOR=#000000] num2[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000000]                textBox1[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Text[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000000] result[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]ToString[/COLOR][COLOR=#666600]();[/COLOR]
[*][COLOR=#666600]}[/COLOR]
[*][COLOR=#000088]else[/COLOR][COLOR=#000088]if[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000000]operaton [/COLOR][COLOR=#666600]==[/COLOR][COLOR=#008800]'*'[/COLOR][COLOR=#666600])[/COLOR]
[*][COLOR=#666600]{[/COLOR]
[*][COLOR=#000000]                result [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000000] num1 [/COLOR][COLOR=#666600]*[/COLOR][COLOR=#000000] num2[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000000]                textBox1[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Text[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000000] result[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]ToString[/COLOR][COLOR=#666600]();[/COLOR]
[*][COLOR=#666600]}[/COLOR]
[*][COLOR=#000088]else[/COLOR][COLOR=#000088]if[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000000]operaton [/COLOR][COLOR=#666600]==[/COLOR][COLOR=#008800]'/'[/COLOR][COLOR=#666600])[/COLOR]
[*][COLOR=#666600]{[/COLOR]
[*][COLOR=#000088]if[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000000]num2 [/COLOR][COLOR=#666600]!=[/COLOR][COLOR=#006666]0[/COLOR][COLOR=#666600])[/COLOR]
[*][COLOR=#666600]{[/COLOR]
[*][COLOR=#000000]                    result [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000000] num1 [/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000] num2[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000000]                    textBox1[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Text[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000000] result[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]ToString[/COLOR][COLOR=#666600]();[/COLOR]
[*][COLOR=#666600]}[/COLOR]
[*][COLOR=#000088]else[/COLOR]
[*][COLOR=#666600]{[/COLOR]
[*][COLOR=#000000]                    textBox1[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Text[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]"DIV/Zero!"[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#666600]}[/COLOR]
[*][COLOR=#666600]}[/COLOR]
[*][COLOR=#000088]else[/COLOR][COLOR=#000088]if[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000000]operaton [/COLOR][COLOR=#666600]==[/COLOR][COLOR=#008800]'%'[/COLOR][COLOR=#666600])[/COLOR]
[*][COLOR=#666600]{[/COLOR]
[*][COLOR=#000000]                result [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000000] num1 [/COLOR][COLOR=#666600]%[/COLOR][COLOR=#000000] num2[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#000000]                textBox1[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Text[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000000] result[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]ToString[/COLOR][COLOR=#666600]();[/COLOR]
[*][COLOR=#666600]}[/COLOR]
[*][COLOR=#000088]else[/COLOR][COLOR=#000088]if[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000000]operaton [/COLOR][COLOR=#666600]==[/COLOR][COLOR=#008800]'s'[/COLOR][COLOR=#666600])[/COLOR]
[*][COLOR=#666600]{[/COLOR]
[*][COLOR=#660066]int[/COLOR][COLOR=#000000] inp[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#660066]int[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]TryParse[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000000]operand1[/COLOR][COLOR=#666600],[/COLOR][COLOR=#000088]out[/COLOR][COLOR=#000000] inp[/COLOR][COLOR=#666600]);[/COLOR]
[*][COLOR=#000000]                result [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#660066]Math[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Sin[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000000]inp[/COLOR][COLOR=#666600]);[/COLOR]
[*][COLOR=#000000]                textBox1[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Text[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000000] result[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]ToString[/COLOR][COLOR=#666600]();[/COLOR]
[*][COLOR=#666600]}[/COLOR]
[*][COLOR=#000088]else[/COLOR][COLOR=#000088]if[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000000]operaton [/COLOR][COLOR=#666600]==[/COLOR][COLOR=#008800]'c'[/COLOR][COLOR=#666600])[/COLOR]
[*][COLOR=#666600]{[/COLOR]
[*][COLOR=#660066]int[/COLOR][COLOR=#000000] inp[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#660066]int[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]TryParse[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000000]operand1[/COLOR][COLOR=#666600],[/COLOR][COLOR=#000088]out[/COLOR][COLOR=#000000] inp[/COLOR][COLOR=#666600]);[/COLOR]
[*][COLOR=#000000]                result [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#660066]Math[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Cos[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000000]num1[/COLOR][COLOR=#666600]);[/COLOR]
[*][COLOR=#000000]                textBox1[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Text[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000000] result[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]ToString[/COLOR][COLOR=#666600]();[/COLOR]
[*][COLOR=#666600]}[/COLOR]
[*][COLOR=#000088]else[/COLOR][COLOR=#000088]if[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000000]operaton [/COLOR][COLOR=#666600]==[/COLOR][COLOR=#008800]'t'[/COLOR][COLOR=#666600])[/COLOR]
[*][COLOR=#666600]{[/COLOR]
[*][COLOR=#660066]int[/COLOR][COLOR=#000000] inp[/COLOR][COLOR=#666600];[/COLOR]
[*][COLOR=#660066]int[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]TryParse[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000000]operand1[/COLOR][COLOR=#666600],[/COLOR][COLOR=#000088]out[/COLOR][COLOR=#000000] inp[/COLOR][COLOR=#666600]);[/COLOR]
[*][COLOR=#000000]                result [/COLOR][COLOR=#666600]=[/COLOR][COLOR=#660066]Math[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Tan[/COLOR][COLOR=#666600]([/COLOR][COLOR=#000000]num1[/COLOR][COLOR=#666600]);[/COLOR]
[*][COLOR=#000000]                textBox1[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]Text[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000000] result[/COLOR][COLOR=#666600].[/COLOR][COLOR=#660066]ToString[/COLOR][COLOR=#666600]();[/COLOR]
[/LIST]



Now can anybody will tell me why the dot(.) button is not producing the like output?






 
Last edited:

jmcilhinney

C# Forum Moderator
Staff member
Joined
Apr 23, 2011
Messages
3,271
Location
Sydney, Australia
Programming Experience
10+
Can you please re-post your code properly? It's not really very readable as it is. Please post the code directly, as plain text, inside appropriate formatting tags, i.e.

[xcode=vb]your code here[/xcode]
 
Top Bottom