63 224
Assignments Done
99,3%
Successfully Done
In July 2018

Answer to Question #20155 in C++ for Jenn

Question #20155
Write a function that takes the first name and last name of a student and returns his/her full name. Write main to test the function.
Sample Input / output:
Enter your first name : Andre
Enter your last name : Wolf
Your full name is Andre Wolf.

I know that if I have that, I would use a prinft() statement and then use a scanf() statement to complete the whole code but I guess it wasn't right. Any tips?
Expert's answer
#include <iostream>
using namespace std;

char fname[100], lname[100];

void main(){
cout<<"Enter your first name : ";
cin>>fname;
cout<<"Enter your last name : ";
cin>>lname;
cout<<"Your full name is "<<fname<<" "<<lname<<".\n";
system("pause");
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions