【Practice】
Practice 1
寫出一個可以跑十次迴圈的函數,每次將一輸入的整數 + 1,計算
uint a = 10
經過迴圈的計算結果。
Practice 2
寫出一個可以判斷奇數的函數
Practice 3
阿豪最近在賣水果,已知水果一斤3000wei,請寫出一個函式
sell()
每次執行可以賣出一斤水果,以及一個函式profit()
計算當前賺了多少ether。
Last updated
Was this helpful?
Practice 1
寫出一個可以跑十次迴圈的函數,每次將一輸入的整數 + 1,計算 uint a = 10
經過迴圈的計算結果。
Practice 2
寫出一個可以判斷奇數的函數
Practice 3
阿豪最近在賣水果,已知水果一斤3000wei,請寫出一個函式sell()
每次執行可以賣出一斤水果,以及一個函式profit()
計算當前賺了多少ether。
Last updated
Was this helpful?