io20_2.01.c

来自「C++ Primer(第三版)的随书源代码」· C语言 代码 · 共 38 行

C
38
字号
#include <iostream.h>
#include <string>

/**
 **

 Please enter the item_number, item_name, and price: 
 10247 widget 19.99
 The values entered are: item# 10247 widget @$19.99

 Please enter the item_number, item_name, and price: 
 10247
  widget
 19.99
 The values entered are: item# 10247 widget @$19.99

 **/

int main() 
{
    int item_number;
    string item_name;
    double item_price;

    cout << "Please enter the item_number, item_name, and price: "
         << endl;

    cin >> item_number;
    cin >> item_name;
    cin >> item_price;

    cout << "The values entered are: item# " 
	 << item_number << " " 
 	 << item_name << " @$" 
 	 << item_price << endl;

}

⌨️ 快捷键说明

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