Added solution to #6 in pass by value