Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitscript authored Sep 18, 2022
1 parent 234696c commit bd86cfe
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions 06Day-Average.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0 <0.9.0;

contract day6 {
//Create a function average(int a,int b,int c). Where a>0,b>0,c>0.
function average(
int256 a,
int256 b,
int256 c
) public pure returns (int256) {
//Return the average of a,b and c.
return (a + b + c) / 3;
}
}

0 comments on commit bd86cfe

Please sign in to comment.