编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第4章编程练习5
#include <iostream>
using namespace std;
struct CandyBar
{
char kind[20];
float weight;
int calory;
};
int main()
{
CandyBar snack=
{
"Mocha Munch",
2.3,
350
};
cout<<"The kind of snack is: "<<snack.kind<<endl;
cout<<"The weight of snack is: "<<snack.weight<<endl;
cout<<"The calory of snack is: "<<snack.calory<<endl;
system("pause");
return 0;
}
编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第4章编程练习5的更多相关文章
- 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习9
#include <iostream> #include <fstream> #include <cstdlib> #include <string> ...
- 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习8
#include <iostream> #include <fstream> #include <cstdlib> const int SIZE=20; using ...
- 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习7
#include <iostream> #include <string> #include <cctype> using namespace std; int m ...
- 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习6
#include <iostream> #include <string> using namespace std; const int MSIZE=100; struct j ...
- 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习5
#include <iostream> using namespace std; const double N1=35000; const int N2=15000; const int ...
- 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习4
#include <iostream> using namespace std; const int strsize=30; const int BOPSIZE=5; void showm ...
- 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习3
#include <iostream> using namespace std; void showmenu(void) { cout<<"Please enter ...
- 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习2
#include <iostream> #include <cctype> using namespace std; const int MAXSIZE=10; int mai ...
- 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习1
#include <iostream>#include <cctype>using namespace std;int main(){ char ch; while((ch=c ...
- 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第5章编程练习9
#include <iostream>using namespace std;int main(){ int num; cout<<"Enter number of ...
随机推荐
- html5页面调用手机打电话功能
<head>里面加上:<meta name="format-detection" content="telephone=yes"/> 需 ...
- requests之json系列(一)
以post方式获取接口指定的相关信息 #! /usr/bin/env python # coding=utf-8 import json import urllib import requests i ...
- DDD工作流持久化(十六)
找到对应的sql文件执行sql语句 产生如下的表: 添加引用: 添加命名空间: using System.Activities.DurableInstancing; using System.Runt ...
- SQL Server 常用函数使用方法
之前就想要把一些 SQL 的常用函数记录下来, 直到今天用到substring()这个函数,C# 里面这个方法起始值是 0,而 SQL 里面起始值是 1.傻傻分不清楚... 这篇博客作为记录 SQL ...
- [转] 设置div的overflow:scroll,但是在手机上滑动的时候有点卡顿
设置div的overflow:scroll,但是在手机上滑动的时候有点卡顿,所以在这个div上加一个css: -webkit-overflow-scrolling : touch; 在苹果手机上使用- ...
- springboot学习(一):创建项目
package com.glory.demo.Controller; import org.springframework.stereotype.Controller; import org.spri ...
- 3998: [TJOI2015]弦论
题解: 每个点的size值就是这个从根-它出现的次数 如果相同只算一次就全部赋值为1就可以了 代码: #include <bits/stdc++.h> #define ll long lo ...
- php通过CURL模拟post提交请求
<?php header("Content-type:text/html;charset=utf-8"); class Test{ public function reque ...
- AtCoder [Dwango Programming Contest V] E 动态规划 多项式
原文链接 https://www.cnblogs.com/zhouzhendong/p/AtCoder-Dwango-Programming-Contest-V-E.html 题意 有 $n$ 个数, ...
- hive中,动态添加map和reduce的大小,以增加并行度
map是配置mapred.max.split.size,来定义map处理文件的大小,默认是256000000字段,换算就是256M. 如果想增加map的并行度,那么就是减少map处理文件的大小即可. ...