mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
tools: format most examples and tutorials, add them to v test-cleancode
(#9826)
This commit is contained in:
parent
dff50686d6
commit
16e79bc3ca
38 changed files with 471 additions and 433 deletions
|
@ -3,15 +3,15 @@
|
|||
|
||||
fn main() {
|
||||
// Check for user input
|
||||
//if os.args.len != 2 {
|
||||
// println('usage: fibonacci [rank]')
|
||||
// if os.args.len != 2 {
|
||||
// println('usage: fibonacci [rank]')
|
||||
|
||||
// Exit
|
||||
// return
|
||||
// }
|
||||
// Exit
|
||||
// return
|
||||
// }
|
||||
|
||||
// Parse first argument and cast it to int
|
||||
// stop := os.args[1].int()
|
||||
// stop := os.args[1].int()
|
||||
stop := 23
|
||||
// Can only calculate correctly until rank 92
|
||||
if stop > 92 {
|
||||
|
@ -23,7 +23,7 @@ fn main() {
|
|||
mut a := 0
|
||||
mut b := 0
|
||||
mut c := 1
|
||||
println(a+c+c)
|
||||
println(a + c + c)
|
||||
for _ in 0 .. stop {
|
||||
// Set a and b to the next term
|
||||
a = b
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue