Rust编程语言打字01_格式化输出
fn main() {
println!("{} days", 31);
println!("{0}, this is {1}. {1}, this is {0}", "Alice", "Bob");
println!("{subject} {verb} {object}",
object="the lazy dog",
subject="the quick brown fox",
verb="jumps over");
println!("{} of {:b} people know binary, the other half don't", 1, 2);
println!("{number:>width$}", number=1, width=6);
println!("{number:>0width$}", number=1, width=6);
println!("My name is {0}, {1} {0}", "Bond");
#[allow(dead_code)]
struct Structure(i32);
//println!("This struct `{}` won't print...", Structure(3));
}
println!("{} days", 31);
println!("{0}, this is {1}. {1}, this is {0}", "Alice", "Bob");
println!("{subject} {verb} {object}",
object="the lazy dog",
subject="the quick brown fox",
verb="jumps over");
println!("{} of {:b} people know binary, the other half don't", 1, 2);
println!("{number:>width$}", number=1, width=6);
println!("{number:>0width$}", number=1, width=6);
println!("My name is {0}, {1} {0}", "Bond");
#[allow(dead_code)]
struct Structure(i32);
//println!("This struct `{}` won't print...", Structure(3));
}
下一篇:微微一笑很倾城Part 12
声明:以上文章均为用户自行添加,仅供打字交流使用,不代表本站观点,本站不承担任何法律责任,特此声明!如果有侵犯到您的权利,请及时联系我们删除。
文章熱度:★☆☆☆☆
文章難度:☆☆☆☆☆
文章質量:☆☆☆☆☆
說明:系統根據文章的熱度、難度、質量自動認證,已認證的文章將參與打字排名!
本文打字排名TOP20
- 1打字怪兽崔豪 01-14 01:56332 KPM
- 2游客14749841 01-13 19:27195 KPM
- 3yiye 01-15 14:02159 KPM
- 4游客14668058... 04-09 16:44147 KPM
- 5hacker_10k 01-28 22:36141 KPM
- 6游客13157895... 03-28 14:54139 KPM
- 7游客79709344 07-03 21:22125 KPM
- 8游客37640151 06-17 05:15113 KPM
- 9游客12769450 01-13 17:25112 KPM
- 10游客18642587... 02-13 09:50104 KPM
- 11Hojel 01-14 09:15100 KPM
- 12Ma_Der 01-14 00:4099 KPM
- 13Katydid 01-14 02:1197 KPM
- 14wdwhwn 01-13 17:0493 KPM
- 15kellmer 01-13 15:4691 KPM
- 16游客13658304 01-14 09:5289 KPM
- 17abcdeabcdeab... 01-14 11:4882 KPM
- 18游客14040383 01-13 15:3981 KPM
- 19游客14756298 01-14 00:2080 KPM
- 20游客15198275 01-14 14:2479 KPM
用户更多文章推荐
- Rust编程语言打字11_3.2.12017-01-15
- Rust编程语言打字06_2.12017-01-14
- Rust编程语言打字04_Testcase: List2017-01-14
- Rust编程语言打字02_格式化输出_Debu...2017-01-14
- Rust编程语言打字03_格式化输出_Disp...2017-01-14