-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathetehr
80 lines (52 loc) · 1.16 KB
/
etehr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
pragma solidity ^0.5.0;
contract myContract{
string public display ="2+4";
}
pragma solidity ^0.5.0;
contract myContract{
uint a=20;
uint b=40;
uint public z = b/a;
}
pragma solidity ^0.5.0;
contract Mycontract {
uint [] public arr;
function insert(uint a) public{
arr.push(a);
}
function fetch() public view returns (uint last)
{
last= arr[arr.length-1];
}
}
pragma solidity ^0.5.0;
contract newcon{
struct kyc {
string name;
uint age;
}
mapping(uint=>kyc ) public person;
function set(uint mobileno,string memory name,uint age) public{
person[mobileno] = kyc(name,age);
}
}
pragma solidity ^0.5.0;
contract myContract{
function greatest (uint a,uint b,uint c ) public pure returns(uint max){
if ((a>b)&& (a>c))
max = a;
else if ((b>a)&&(b>c))
max= b;
else
max=c;
}
}
pragma solidity ^0.5.0;
contract myContract {
function facto(uint num) public pure returns (uint fact){
uint f=1;
for(uint i=1;i<=num;i++){
f=f*i;
}
}
}