S(n) = a for n=1
S(n) = b for n=2
S(n) = c for n=3
S(n) = S(n-1) + S(n-2) + S(n-3) for n>3
-
Create a function returnOwner() which returns the address of the owner. This returnOwner() can only be called by the owner (that we set using constructor()). If some other address tries to call this returnOwner() it should revert with this statement "You are not the owner" Note - Function will be public.
-
Create a function checkBalance(address of a user) . This checkBalance(address user)() will take one argument - a address type variable. This function will return the balance of the user who has called this function. With this function user can check their balance only. If the user tries to check some other address balance the checkBalance() should revert with "You are not the owner of the account".
-
If the length of both array are equal, then it will transfer the amount from the amount array to the address array in such a way that the address at ith index of address array receives the amount at ith index of amount array. For Example - If address array =[0x412, 0x2ab, 0x3de] and amount array = [10,5,90] then send() will transfer amount 10 to address 0x412 , amount 5 to address 0x2ab, amount 90 to address 03de.