You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
davhojt 5f935e29a8 docs: implement Miguel's feedback 2 years ago
..
README.md docs: implement Miguel's feedback 2 years ago

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?
$