Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

Basic Variables Entry C++ Programming

#include <iostream>

using namespace std;

int main(){
	
	string f_name, l_name, m_name;
	int age, dob;
	
	cout << "Enter first name:" << endl;
	cin >> f_name;
	cout << "Enter last name:" << endl;
	cin>>l_name;
	cout << "Enter middle name:" << endl;
	cin >> m_name;
	
	cout << "Enter your age:" << endl;
	cin >> age;
	cout << "Enter your date of birth:" << endl;
	cin >> dob;
	
	return 0;
}
 
PREVIOUS NEXT
Tagged: #Basic #Variables #Entry #Programming
ADD COMMENT
Topic
Name
5+5 =