ex11-01.cpp

来自「在c环境下的对数据结构进行讲解,包含有例题及答案」· C++ 代码 · 共 25 行

CPP
25
字号
//EX11-01.cpp
#include <iostream.h>	//cout,cin
#include <conio.h>		// getch()
/*struct rec
{ char item[5];
  char name[20];
  float unit_price;
  short quantity;
  char customer_no[5];
} sale;
*/
void main()
{
  cout << "The structure as following:\n";
  cout<<"struct rec"
      <<"\n{ char item[5];"
      <<"\n  char name[20];"
      <<"\n  float unit_price;"
      <<"\n  short quantity;"
      <<"\n  char customer_no[5];"
      <<"\n} sale;";
  getch();
}

⌨️ 快捷键说明

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