2019年2月16日 星期六

Julia 語言 --將公斤轉換成磅數 (2) using Printf

Julia 語言 --將公斤轉換成磅數 (2)   using Printf


println("將公斤換算成磅")
K=50
P=2.2*K
println(K,"公斤 = ",P,"磅")
println()
println("$(K) 公斤 = $(P) 磅")
println()

using Printf
s = @sprintf("%3.1f 公斤 = %3.1f 磅" , float(K) , float(P) )
println(s)






沒有留言:

張貼留言

WOKWI ESP32 LED Control , Node-Red MQTT SQLITE  

WOKWI ESP32 LED Control ,  Node-Red  MQTT SQLITE   const char broker[] = "test.mosquitto.org" ; //const char broker[] = "br...