Skip to content

Commit a7113fe

Browse files
authored
Add files via upload
0 parents  commit a7113fe

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Solidity Calculator Project.sol.txt

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// SPDX-License-Identifier: MIT
2+
3+
Pragma solidity ^0.8.26;
4+
5+
contract Calculator {
6+
uint256 result = 0;
7+
function add(uint256 num) public {
8+
result += num ;
9+
}
10+
function subtract(uint256 num) public {
11+
result -= num;
12+
}
13+
function multiply(uint256 num) public {
14+
result *= num;
15+
}
16+
function get() public view returns (uint256){
17+
return result;
18+
}
19+
}

0 commit comments

Comments
 (0)