#include<iostream>
struct Pizza
{
char name[30];
float diameter;
float weight;
};
int main()
{
using namespace std;
Pizza* p=new Pizza;
cout<<"Please input the information of Pizza company:\n";
cout<<"diameter: ";
cin>>(*p).diameter;
cout<<"Name: ";
cin.getline(p->name,30);
cout<<"weight: ";
cin>>p->weight;
cout<<"Here are information:\n";
cout<<"Name: "<<(*p).name<<" Company\ndiameter: "<<p->diameter
<<" inch\nweight: "<<(*p).weight<<" pounds"<<endl;
return 0;
}I
struct Pizza
{
char name[30];
float diameter;
float weight;
};
int main()
{
using namespace std;
Pizza* p=new Pizza;
cout<<"Please input the information of Pizza company:\n";
cout<<"diameter: ";
cin>>(*p).diameter;
cout<<"Name: ";
cin.getline(p->name,30);
cout<<"weight: ";
cin>>p->weight;
cout<<"Here are information:\n";
cout<<"Name: "<<(*p).name<<" Company\ndiameter: "<<p->diameter
<<" inch\nweight: "<<(*p).weight<<" pounds"<<endl;
return 0;
}I