#include <iomanip> #include <iostream> using namespace std; struct nc{char Name[100];int ml;int id;double money;int kc; }; int main(){/*1 手打张娜 8 500 202 口喷张娜 8 500 203 急眼张娜 8 500 204 茉莉张娜 8 500 205 暴打张娜 8 500 20*/ nc a[10];for(int i=0;i<5;i++){printf("请输入奶茶第【%d】杯奶茶:\n",i+1);cin>>a[i].id>>a[i].Name>>a[i].money>>a[i].ml>>a[i].kc;printf("奶茶【%s】已经录入\n",a[i].Name);cout<<endl;}system("cls");for(int i=0;i<5;i++){if(i==0){printf("编号,名称,价格,容量,库存\n");}printf("%d,%s,%.2f,%d,%d\n",a[i].id,a[i].Name,a[i].money,a[i].ml,a[i].kc);}return 0; }