⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ex3_3.cpp

📁 《C++面对对象程序设计》的所有源代码和部分头文件
💻 CPP
字号:
// ex3_3.cpp
// makes a number out of digits
#include <iostream>
using namespace std;
#include <conio.h>                   //for getche()

int main()
   {
   char ch;                    
   unsigned long total = 0;          //this holds the number

   cout << "\nEnter a number: ";
   while( (ch=getche()) != '\r' )    //quit on Enter
      total = total*10 + ch-'0';     //add digit to total*10
   cout << "\nNumber is: " << total << endl;
   return 0;
   }

⌨️ 快捷键说明

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