File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change
1
+ // Main function
1
2
fn main ( ) {
2
3
println ! ( "Hello, Satoshi!" ) ;
3
4
4
5
println ! ( "-----Wallet-----" ) ;
5
6
6
7
another_function ( 99999 ) ;
7
8
8
- print_labeled_measurement ( 21000 , 's' )
9
+ print_labeled_measurement ( 21000 , 's' ) ;
10
+
11
+ let x = {
12
+ let y = 6 ;
13
+ y + 1
14
+ } ;
15
+ println ! ( "Value of x is: {x}." ) ;
16
+ let x = five ( ) ;
17
+ println ! ( "Value of x is now: {x}." )
9
18
}
10
19
20
+ // Simple function that print provided Bitcoin Price
11
21
fn another_function ( x : i32 ) {
12
22
println ! ( "The Bitcoin price is {x}" ) ;
13
23
}
14
24
25
+ // Function that prints value and unit
15
26
fn print_labeled_measurement ( value : i32 , unit_label : char ) {
16
27
println ! ( "Bitcoin Balance : {value}{unit_label}" ) ;
17
28
}
29
+
30
+ // Function that returns 5
31
+ fn five ( ) -> i32 {
32
+ 5
33
+ }
You can’t perform that action at this time.
0 commit comments