/Solidity-Assignment-2-JP

Second Assignmen for Jawan Pakistan Solidity Course.

Primary LanguageSolidity

Solidity-Assignment-2-JP

Second Assignment for Jawan Pakistan Solidity Course.

  • Task 1)Create a state variable of uint type (need not to be public). -- Create a set ( ) and with one argument. And set the value of the created state variable with the value passed as an argument to the set ( ). -- Then create another function get ( ) which returns the value of the state variable.
  • Task 2: Create a function evaluate(int a , int b). Subtract the difference of a and b from the sum of a and b. Return the result of the above task from the evaluate()
  • Task 3: Create a function find(int a). Where a>0. Return the remainder when a is divided by 3.
  • Task 4: Create a function average(int a,int b,int c). Where a>0,b>0,c>0. Return the average of a,b and c.