public/subjects/doubtful
davhojt 5f935e29a8 docs: implement Miguel's feedback 2022-05-23 20:46:23 +03:00
..
README.md docs: implement Miguel's feedback 2022-05-23 20:46:23 +03:00

README.md

doubtful

Instructions

Create a function named doubtful which appends a question mark to every string passed to it. It must not return a value.

Expected functions

pub fn doubtful(s: /*give the correct type*/ ) {
}

You'll need to complete the function signature, so that it works properly with the usage example. You'll also need to complete the usage if you plan to use it.

Usage

Here is a program to test your function

fn main() {
	let mut s = String::from("Hello");

	println!("Before changing the string: {}", s);

	doubtful(/*add your code here*/);

	println!("After changing the string: {}", s);
}

And its output

$ cargo run
Before changing the string: Hello
After changing the string: Hello?
$