![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
新手学习C++作业
林木深深
希望自己转码成功,加油!
展开
-
C++“游戏”:随机扑克牌,花色和数字的选择(书本习题)
#include#include#include#includeusing namespace std;//抽取卡牌,输出花色,排名。int main(){srand(time(0));int rankNumber= rand() % 13;int colorNumber = rand() % 4;string color, rank;switch(rankNumber)...原创 2019-09-03 20:10:21 · 2261 阅读 · 1 评论 -
考虑时区偏移量,以12小时制显示当前时间,C++
代码如下:#include<iostream>#include<ctime>using namespace std;//以12小时制显示当前时间int main (){ cout << "Enter the time zone offset to GMT : "; float offset; cin >> offs...原创 2019-09-04 14:30:37 · 345 阅读 · 0 评论