hi .. hope you will be fine and having good health as well.. would please sort something out for me,, I need your kind help..
Below is the code of a program,, it ask the user for information..
This is the output (Please, enter your first name: John
Hello, John!)
First Question:???
when I insert my full name JUNAID KHAN, so it just shows JUANID so can you please tell me why is this so and what th solution for that???
2ND Question:
how to write the same programme using functions?
#include<iostream>
using namespace std;
int main()
{
char question[]= "Please Enter your name : ? ";
char greeting[]= "Hello " ;
char yourname[200];
//Programed By John (lol or ibranext)
#include <iostream>
#include <conio>
usingnamespace std;
int main()
{
int fName,lName,greeting,end ;//all my programs HAVE end it is Most important to me!
greeting=[Your greeting Here] ;//Name It
cout << "\n Enter FIRST Name Here: " ;//Dont Touch Here
cin >> fName ;//Dont Touch Here
cout << "\n Enter LAST Name Here: " ;//Dont Touch Here
cin >> lName ;//Dont Touch Here
clrscr() ;//Del it If You Dont Want It to Clear Screen.
cout << greeting << fName << lName ;//Dont Touch Here
cin >> end ;//Dont Touch Here
}
How are your programs that "HAVE end it is Most important to me" related to the original post?! And what will occur if variable 'end' will not be important to author of the thread?!:)
cout << "\n Enter FIRST Name Here: " ;
cout << "\n Enter LAST Name Here: ";
What if some guy with the name "Gaius Julius Caesar" want to use this program? Actually people who have two part name is a minority. Most of the world does not have names consisting from two parts.