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 Oct 7, 2022
1 parent d9fe072 commit 697f1c0
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions 25Day-Enum.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0 <0.9.0;

contract Day1 {
//Create a variable of enum type.
enum House {
SMALL,
MEDIUM,
LARGE
}
House choice;

//Create a function setLarge(). This will set the value of the enum type variable (created at step 1) with LARGE.
function setLarge() public {
choice = House.LARGE;
}
//Create a function getChoice() which will return the value of the enum type variable (created at step 1) .
function getChoice() public view returns (House) {
return choice;
}

}

0 comments on commit 697f1c0

Please sign in to comment.