diff --git a/subjects/print_and_consume/README.md b/subjects/print_and_consume/README.md new file mode 100644 index 000000000..62be27045 --- /dev/null +++ b/subjects/print_and_consume/README.md @@ -0,0 +1,39 @@ +## print_and_consume + +### Instructions + +Create a function `print_and_consume` which takes a `String`, print the string with a new line at the end and consume it (the string can't be used after the function is called). + +Create a function `only_print` that takes a `String` and print it with a new line without consuming it. + +### Expected functions + +```rust +pub fn print_and_consume(argument) { +} + +pub fn only_print(argument) { +} + +``` + +### Usage + +Here is a possible program to test your function : + +```rust +use print_and_consume::*; + +fn main() { + + +} +``` + +And its output: + +```console +$ cargo run + +$ +```