Write a statement that assigns fullName with firstName a spa

Write a statement that assigns fullName with firstName, a space, then lastName. function fullName = CombineNames(firstName, lastName) % firstName: User specified string % lastName: User specified string % Write a statement that assigns fullName with firstNarne, a space, then lastName fullName = firstName; end Code to call your function when you click Run CombineNames(\'Alan\', \'Turing\')

Solution

Hi there, just add one line in your function it will solve the problem.

fullName = strcat( firstName, {\' \'} ,lastName);

This function will add your first name then add space and then it will add last name .

If you find further help , please comment below.

Have a Nice Day ...

 Write a statement that assigns fullName with firstName, a space, then lastName. function fullName = CombineNames(firstName, lastName) % firstName: User specifi

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site