Skip to content

Instantly share code, notes, and snippets.

@ArslanKathia
Created January 26, 2023 17:28
Show Gist options
  • Save ArslanKathia/3a5378f5c815d40a7cf38e0aa78d1a52 to your computer and use it in GitHub Desktop.
Save ArslanKathia/3a5378f5c815d40a7cf38e0aa78d1a52 to your computer and use it in GitHub Desktop.
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8;
contract loops{
function loopss() public pure returns(uint){
uint count = 0;
for(uint i=0;i<10;i++){
if(i==6 || i==8){
continue;
}
if(i==7){
break;
}
count = count + 5;
}
// uint j=0;
// while(j<10){
// count = count +10;
// j++;
// }
// do{
// count = count +3;
// j++;
// }while(j<50);
return count;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment