From 996391606c4128b70056259868e8f4737f6bb73a Mon Sep 17 00:00:00 2001 From: Aryan Malik <88618913+Aryan9592@users.noreply.github.com> Date: Sat, 7 Oct 2023 01:47:28 +0530 Subject: [PATCH] Update Voting.sol --- Level1/BingoDecentrailized/Voting.sol | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Level1/BingoDecentrailized/Voting.sol b/Level1/BingoDecentrailized/Voting.sol index 41dbf38..c5980e4 100644 --- a/Level1/BingoDecentrailized/Voting.sol +++ b/Level1/BingoDecentrailized/Voting.sol @@ -14,8 +14,8 @@ contract voting{ //Voter[] public voters; mapping(uint=>address) voters; mapping(address=>bool) voted; - uint public len=0; - uint public sum=0; + uint public len; + uint public sum; uint public candidate_winner; uint public winner; @@ -35,9 +35,9 @@ contract voting{ //Winner of Each round can be seen function findWinner() private{ - uint max=0; + uint max; - for(uint i=0;i<25;i++){ + for(uint i; i<25; ++i){ if(freq[i]>max){ max=freq[i]; winner=i+1; @@ -49,11 +49,11 @@ contract voting{ //Restart a round function reset() private{ - for(uint i=0;i