/*
* Copyright (c) 2012, Computer College, Yantai University
* All rights reserved.
* Author: Tian Yu
* Date of Completion: November 4, 2012
* Version Number: v1.0
*
* Input Description: None
* Problem Description: None
* Program output: None
* Problem Analysis: No
* Algorithm Design:
#include <iostream>
using namespace std;
int main ()
{
double f=100000,m=0.01,fs=0,ms=0;
int d=1;
for (d=1;d<=30;d++)
{
fs+=f;
ms+=m;
m*=2;
cout<< "<<d<<" Day, The Stranger to the millionaire cumulative "<<fs<<", the rich to strangers cumulative "<<ms<<endl;
}
cout<< "In the end, the stranger to the rich:" <<fs<< ", Rich to Strangers:" <<ms<< "," <<endl;
if (fs>ms)
cout<< "Stranger egg aches ... ";
else
{
if (fs<ms)
cout<< "rich egg pain ...." ";
else
cout<< "Two people flat, uninteresting deal";
}
cout<<endl;
return 0;
* Operation Result:
* Experience:
Generally this game rich have not won, this is the case, the rich continue to egg pain ....