herrDeng網內搜尋
自訂搜尋
Ads
訂閱:
張貼留言 (Atom)
熱門文章
-
url="https://www.twse.com.tw/exchangeReport/STOCK_DAY?response=json&date=20220330&stockNo=2330"
-
教育部為提昇全民資安素養與電腦防護能力,本部於101年9月5日至11月5日舉辦「全民資安素養自我評量」活動,請在活動期間內踴躍上網檢測資訊安全素養認知程度,並有機會參與抽獎,詳情請參閱活動網站(網址: https://isafe.moe.edu.tw/event
-
python pandas對黃金、外匯匯率的爬蟲練習,並使用matplotlib.pyplot的函數plot, scatter做資料視覺化處理,採用numpy的統計函數,分析黃金價格波動與歐元走勢的關聯。
-
Python C C++ 2 pointer速解Leetcode 2337 Move Pieces to Obtain a String 多日Leetcode的問題都可用2-pointer法來解,今日2337. Move Pieces to Obtain a String也不例...
-
你會用C的算子sizeof?
-
Leetcode的1652. Defuse the Bomb是絕佳的練習題,特別是針對Python的使用者,雖說是sliding window 是簡單的那種,還可練習loop, slicing, minus index etc . https://leetcode.com/pro...
3 則留言:
#include <string>
#include <iostream>
using namespace std;
int main(int argc, char** argv) {
std::string horoscope[14];
horoscope[0] = "無此星座";
horoscope[1] = "摩羯座";
horoscope[2] = "水瓶座";
horoscope[3] = "雙魚座";
horoscope[4] = "白羊座";
horoscope[5] = "金牛座";
horoscope[6] = "雙子座";
horoscope[7] = "巨蟹座";
horoscope[8] = "獅子座";
horoscope[9] = "處女座";
horoscope[10] = "天秤座";
horoscope[11] = "天蠍座";
horoscope[12] = "蛇夫座";
horoscope[13] = "人馬座";
int n;
cout<<"Input n="
cin>>n;
cout<<horoscope[n]<<end1;
#include <string>
#include <iostream>
using namespace std;
int main(int argc, char** argv) {
string hor[14];
hor[0] = "無此星座";
hor[1] = "摩羯座";
hor[2] = "水瓶座";
hor[3] = "雙魚座";
hor[4] = "牡羊座";
hor[5] = "金牛座";
hor[6] = "雙子座";
hor[7] = "巨蟹座";
hor[8] = "獅子座";
hor[9] = "處女座";
hor[10] = "天秤座";
hor[11] = "天蠍座";
hor[12] = "蛇夫座";
hor[13] = "射手座";
int m = 0;
int d = 0;
cout << "輸入月份:";
cin >> m;
cout << "輸入日期:";
cin >> d;
int day = 0;
day = ((100 * m) + d);
int n = 0;
switch (m) {
case 1 :
if (day < 121) n = 13;
else n = 1;
break;
case 2 :
if (day < 217) n = 1;
else n = 2;
break;
case 3 :
if (day < 312) n = 2;
else n = 3;
break;
case 4 :
if (day < 419) n = 3;
else n = 4;
break;
case 5 :
if (day < 514) n = 4;
else n = 5;
break;
case 6 :
if (day < 622)n = 5;
else n = 6;
break;
case 7 :
if (day < 721) n = 6;
else n = 7;
break;
case 8 :
if (day < 811) n = 7;
else n = 8;
break;
case 9 :
if (day < 916) n = 8;
else n = 9;
break;
case 10 :
if (day < 1031) n = 9;
else n = 10;
break;
case 11 :
if (day < 1124) n = 10;
else if(day < 1130) n = 11;
else n = 12;
break;
case 12 :
if (day < 1218) n = 11;
else n = 12;
break;
default :
n = 0;
}
cout<<hor[n]<<endl;
return 0;
}
#include <string>
#include <iostream>
using namespace std;
int main(int argc, char** argv) {
string hor[14];
hor[0] = "無此星座";
hor[1] = "摩羯座";
hor[2] = "水瓶座";
hor[3] = "雙魚座";
hor[4] = "牡羊座";
hor[5] = "金牛座";
hor[6] = "雙子座";
hor[7] = "巨蟹座";
hor[8] = "獅子座";
hor[9] = "處女座";
hor[10] = "天秤座";
hor[11] = "天蠍座";
hor[12] = "蛇夫座";
hor[13] = "射手座";
int m = 0;
int d = 0;
cout << "輸入月份:";
cin >> m;
cout << "輸入日期:";
cin >> d;
int day = 0;
day = ((100 * m) + d);
int n = 0;
switch (m) {
case 1 :
if (day < 121) n = 13;
else n = 1;
break;
case 2 :
if (day < 217) n = 1;
else n = 2;
break;
case 3 :
if (day < 312) n = 2;
else n = 3;
break;
case 4 :
if (day < 419) n = 3;
else n = 4;
break;
case 5 :
if (day < 514) n = 4;
else n = 5;
break;
case 6 :
if (day < 622)n = 5;
else n = 6;
break;
case 7 :
if (day < 721) n = 6;
else n = 7;
break;
case 8 :
if (day < 811) n = 7;
else n = 8;
break;
case 9 :
if (day < 916) n = 8;
else n = 9;
break;
case 10 :
if (day < 1031) n = 9;
else n = 10;
break;
case 11 :
if (day < 1124) n = 10;
else if(day < 1130) n = 11;
else n = 12;
break;
case 12 :
if (day < 1218) n = 11;
else n = 12;
break;
default :
n = 0;
}
cout<<hor[n]<<endl;
return 0;
}
張貼留言