Answers for "how to put your name on c ++"

C++
0

how to put your name on c ++

#include <iostream>
using namespace std;

#define MAX_LENGTH 100

int main()
{
	char name[MAX_LENGTH]={0};
	int age;
	
	cout<<"Enter name of the person: ";
	cin.getline(name,MAX_LENGTH);
	cout<<"Enter age: ";
	cin>>age;
	
	cout<<"Name: "<<name<<endl;
	cout<<"Age: "<<age<<endl;
	
	return 0;
}
Posted by: Guest on January-21-2021

Code answers related to "how to put your name on c ++"

Browse Popular Code Answers by Language