1d1.cc

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

CC
54
字号
/*
NIIT 《C++ & CGI PROGRAMMING &SCRRIPTING》 Skill Base
P1.10		◆1.D.1◆
Checkup:	MrZhou
*/

#include <iostream.h>

int main()
{

/* Define Variables */
	char mobileNo[11];
	char name[26];
	char dateOfBirth[9];
	char billingAddress[51];
	char city[26];
	float amountOutstanding;

/* Accept Data From The User */
	cout << endl << "Please enter customer details" << endl;
	cout << "Mobile phone number: ";
	cin >> mobileNo;
	cin.ignore();
	cout << endl << "Name: ";
	cin.getline(name,25);
	cout << endl << "Date of birth: ";
	cin >> dateOfBirth;
	cin.ignore();
	cout << endl << "Billing address: ";
	cin.getline(billingAddress,51);
	cout << endl << "City: ";
	cin.getline(city,25);
	cout << endl << "Amount due: ";
	cin >> amountOutstanding;

/* Display Data */
	cout << endl << endl << "The details of the customer are:" << endl;
	cout << "Mobile phone number: ";
	cout << mobileNo << endl;
	cout << "Name: ";
	cout << name << endl;
	cout << "Date of birth: ";
	cout << dateOfBirth << endl;	
	cout << "Billing address: ";
	cout << billingAddress << endl;
	cout << "City: ";
	cout << city << endl;
	cout << "Amount due: ";
	cout << amountOutstanding << endl;
	return 0;
}

⌨️ 快捷键说明

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