文件名称:5name
- 所属分类:
- 控制台(字符窗口)编程
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2013-12-02
- 文件大小:
- 1kb
- 下载次数:
- 0次
- 提 供 者:
- ja***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
输入五个姓名,并将几段名字的首字母大写,能识别空格。最后将输入的名字输出到data文件-Write a programme that reads in the name (Given name+ space+ family name) of 5
persons and writes them to a disk file. Each name in the disk file always starts on a new line.
Note that you need consider the case where a person has three or more name parts (e.g., Given,
Middle and Family) in order to get full marks (you also need check/change the first letter of the
names into upper case.)
Part of the code is given on this page. Read the code first and make sure you understand each
line. What you need to do then is to write a C++ function which
i). Displays a message on the screen such as “This function is called xx times” where xx should
be the value of the counter in the for loop of the main function.
ii). reads in a name from the keyboard (full name) and returns it to the main function.
persons and writes them to a disk file. Each name in the disk file always starts on a new line.
Note that you need consider the case where a person has three or more name parts (e.g., Given,
Middle and Family) in order to get full marks (you also need check/change the first letter of the
names into upper case.)
Part of the code is given on this page. Read the code first and make sure you understand each
line. What you need to do then is to write a C++ function which
i). Displays a message on the screen such as “This function is called xx times” where xx should
be the value of the counter in the for loop of the main function.
ii). reads in a name from the keyboard (full name) and returns it to the main function.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
5name.cpp