4.5

来源:互联网 发布:知难而返百度云 编辑:程序博客网 时间:2024/06/06 19:28
#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;}

0 0
原创粉丝点击