Big millionaire ... This tycoon is not a millionaire ....

Source: Internet
Author: User

/*
* 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 ....

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.