《c++大学教程实验指导书》源码

源代码在线查看: digits.cpp

软件大小: 225 K
上传用户: ydyzd_2008
关键词: 大学 教程 实验指导书 源码
下载地址: 免注册下载 普通下载 VIP

相关代码

				// Chapter 1 of C++ How to Program
				// digits.cpp
				#include 
				
				using std::cout;
				using std::cin;
				using std::endl;
				
				int main()
				{
				   int number;
				
				   cout 				   cin >> number;
				
				   /* Write a statement to print the left-most digit of the 
				      5-digit number */ 
				   /* Write a statement that changes number from 5-digits 
				      to 4-digits */
				   /* Write a statement to print the left-most digit of the 
				      4-digit number */
				   /* Write a statement that changes number from 4-digits
				      to 3-digits */
				   /* Write a statement to print the left-most digit of the
				      3-digit number */
				   /* Write a statement that changes number from 3-digits
				      to 2-digits */
				   /* Write a statement to print the left-most digit of the
				      2-digit number */
				   /* Write a statement that changes number from 2-digits 
				      to 1-digit */
				   cout 				
				   return 0;
				
				} // end main
				
				
				/**************************************************************************
				 * (C) Copyright 1992-2003 by Deitel & Associates, Inc. and Prentice      *
				 * Hall. All Rights Reserved.                                             *
				 *                                                                        *
				 * DISCLAIMER: The authors and publisher of this book have used their     *
				 * best efforts in preparing the book. These efforts include the          *
				 * development, research, and testing of the theories and programs        *
				 * to determine their effectiveness. The authors and publisher make       *
				 * no warranty of any kind, expressed or implied, with regard to these    *
				 * programs or to the documentation contained in these books. The authors *
				 * and publisher shall not be liable in any event for incidental or       *
				 * consequential damages in connection with, or arising out of, the       *
				 * furnishing, performance, or use of these programs.                     *
				 *************************************************************************/			

相关资源