1p1.cc

来自「C++ interview materials. Very helpful fo」· CC 代码 · 共 43 行

CC
43
字号
/*
NIIT 《C++ & CGI PROGRAMMING &SCRRIPTING》 Skill Base
P1.12		◆1.P.1◆
Checkup:	MrZhou
17:49 2004-09-26
*/

#include <iostream.h>

int main()
{
/* Define Variables */
	char name[26];
	char address[51];
	char city[26];
	char phoneNo[11];

/* Accept Data From The User */
	cout << endl << "Please enter dealer details" << endl;
	cout << endl << "Name: ";
	cin.getline(name,25);
	cout << endl << "Address: ";
	cin.getline(address,50);
	cout << endl << "City: ";
	cin.getline(city,25);
	cout << endl << "Phone number: ";
	cin.getline(phoneNo,25);	

/* Display Data */
	cout << endl << endl << "The details of the customer are:"
  	     << endl;
	cout << "Name: ";
	cout << name << endl;
	cout << "Address: ";
	cout << address << endl;
	cout << "City: ";
	cout << city << endl;
	cout << "Phone number: ";
	cout << phoneNo << endl;
	return 0;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?