Saturday, August 13, 2022

Rust Summer

"Rust in Small Pieces"

It's Summer, ... well, in the Northern Hemisphere.

Write summer in Rust:

$ ./summer
The sum of [] is 0.0.

$ ./summer 1 2 3.14159
The sum of [1.0, 2.0, 3.14159] is 6.14159.

$ ./summer 1 apple 2 bananas
halts with Rust error: "apple isn't a number"

(answer

No comments:

Post a Comment