Giter Club home page Giter Club logo

c-'s People

Contributors

aurictw avatar

Stargazers

 avatar

Watchers

 avatar

c-'s Issues

C++練習

#include
using namespace std;
int main()
{
string name,birth,inv;
int edu,rev,get,asset,who,invest_concept,expr,Q1,Q2,Q3,Q4,Q5;
cout <<"------------------------基本資料---------------------------"<<endl;
cout <<"姓名: ";
cin>>name;
cout <<"生日(xxxx年/xx月/xx日): ";
cin>>birth;
cout <<"教育程度\n1.國小\n2.國中\n3.高中\n4.五專\n5.大學以上\n學歷: ";
cin>>edu;
cout <<"年收入(NTD): ";
cin>>rev;
cout <<"資產總淨值(NTD): ";
cin>>asset;
cout <<"投資目的: ";
cin>>inv;
cout <<"投資經驗(年): ";
cin>>expr;
cout <<"-------------------------------------------------------------"<<endl;
cout <<"1.不熟悉,親友推薦就會投資\n2.投資經驗較少,但有基本的投資概念"<<endl;
cout <<"3.了解多數的金融商品,會先判斷再投資\n以下何者最能描述您的理財知識與基金投資情境: ";
cin>>invest_concept;
cout <<"-------------------------------------------------------------"<<endl;
cout <<"1.本人\n2.未成年本人\n3.法定代理人代填\n填寫人: ";
cin>>who;
int total_score=0;
cout <<"------------------------基本資料風險評估------------------------"<<endl;
if (invest_concept == 1)
{
cout <<"較無投資觀念,請多做研究再來進行投資"<<endl;
}
else
{
cout <<"投資觀念清楚,請做以下風險偏好的評估"<<endl;
total_score += 1;
cout <<"------------------------風險偏好評估----------------------------"<<endl;
cout <<"(1)一支股票普遍持有時長\n1:一天內\n2:一週內\n3:幾個月\n4:以年為單位\nANS: ";
cin >>Q1;
if(Q1==3)
{
total_score=total_score-1;
}
if(Q1==4)
{
total_score-=2;
}
cout <<"(2)偏好的金融商品\n1:債券\n2:股票\n3:選擇權\n4:期貨\nANS: ";
cin >>Q2;
if(Q2==2)
{
total_score-=1;
}
else if(Q2>2)
{
total_score-=3;
}
cout <<"(3)一個投資賺幾(%)就會退場\n1:10\n2:50\n3:100\n4:100up\nANS: ";
cin >>Q3;
if(Q3==2)
{
total_score-=1;
}
else if(Q3==3)
{
total_score-=2;
}
else if(Q3==4)
{
total_score-=3;
}
cout <<"(4)假設過去一年以來,您原本100萬元台幣的資金投入基金已經損失10%,這時您會?\n(1) 全部認賠,把所有的錢拿回來\n(2) 不會立刻採取行動,再觀望一陣子\n(3) 積極以較低的價格加碼進場\nANS: ";
cin>>Q4;
if(Q4==1)
{
total_score+=1;
}
else if(Q4==2)
{
total_score-=1;
}
else if(Q4==3)
{
total_score-=2;
}
cout <<"(5)為了因應不時之需,您應該有一筆可以隨時動用的現金或活期存款做為備用金,請問您所持有的「備用金」相當於幾個月的家庭支出?\n(1) 沒有備用金\n(2) 三個月以下 \n(3) 超過六個月未達一年\n(4) 超過一年以上\nANS: ";
cin>>Q5;
if(Q5==4)
{
total_score+=3;
}
else if(Q5==3)
{
total_score+=1;
}
else if(Q5==1)
{
total_score-=3;
}
cout <<"------------------------風險偏好評估結果----------------------------"<<endl;
if(total_score>=0)
{
cout <<"屬於風險規避者"<<endl;
}
else if(total_score>=-3&&total_score<0)
{
cout <<"屬於偏好一定程度的風險者"<<endl;
}
else if(total_score<-3)
{
cout <<"屬於偏好大風險者"<<endl;
}
cout <<"--------------------------------------------------------------------"<<endl;
}

}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.