结构声明

来源:互联网 发布:linux查看软件版本 编辑:程序博客网 时间:2024/05/01 00:35

#include "stdafx.h"#include<iostream>struct inflatable{char name[20];float volume;double price;};int main(){    using namespace std;inflatable guest={"Glorious Gloria",1.88,29.99};inflatable pal={"Audacious Arthur", 3.12,32.99};cout<<"Expand your guest list with"<<guest.name;cout<<" and "<<pal.name<<"\n";cout<<"you can have both for $";cout<<guest.price+pal.price<<"!\n";    return 0;}


0 0