#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
using namespace std;
struct CandyBar
{
char brand[20];
double weight;
int calorie;
};
int main()
{
CandyBar sanck
{
"Mocha Munch",
2.3,
350
};
cout << "The name of this candy bar is " << sanck.brand << endl;
cout << "and the weight of a block of one is " << sanck.weight << " gram."<<endl;
cout << "oh! one of a candy bar includes " << sanck.calorie << " calorie!" << endl;
}
4.5
最新推荐文章于 2025-03-06 12:48:58 发布