What are function?Explain in brief
In creating calculator using java
Answers
Answered by
1
Functions mainly refers to the piece of code which performs some operations and operationally returns a value
Coding for making calculator is
Int no1, no2, sum;
no1=Integer.parseInt(tf1.getText());
no2=Integer.parseInt(tf2.getText());
sum=no1+no2;
tf3.setText(" "+sum);
Add labels and text fields as per your convenience
Coding for making calculator is
Int no1, no2, sum;
no1=Integer.parseInt(tf1.getText());
no2=Integer.parseInt(tf2.getText());
sum=no1+no2;
tf3.setText(" "+sum);
Add labels and text fields as per your convenience
aasmi123:
And same for other operators also just change the signs
Similar questions
Social Sciences,
7 months ago
Math,
7 months ago
Social Sciences,
1 year ago
Math,
1 year ago
Biology,
1 year ago