U E D R , A S I H C RSS

하욱주/Crap

~cpp 
  ( ...ㅡㅡ;;)

#include<iostream>
#include<stdlib.h>
#include<time.h>
using namespace std;

void main()
{
	double money=1000;
	double beting;
	int num;
	int sq1,sq2;

	
	while(money>=10)
	{
		cout << "  $" << money << " ." << endl
			 << " ($10~$100) : $"; cin >> beting;
		if(money<beting)
		{
			cout << "  .   ." <<endl;
			continue;
		}
		if(beting >100 || beting <10)
		{
			cout << "$10~$100   ." << endl;
			continue;
		}
		money-=beting;
		cout << "  $" << beting <<" ." << endl
			 << "까?" << endl
			 << "|----------------------------------|" <<endl
			 << "| Number |        |        |" <<endl
			 << "|--------+------------+------------|" <<endl
			 << "|   1    |   2 or 12  |     5:1    |" <<endl
			 << "|   2    |   4 or 10  |    2.5:1   |" <<endl
			 << "|   3    |   6 or 8   |    1.5:1   |" <<endl
			 << "|----------------------------------|" <<endl
			 <<" ? (1 ~ 3) : "; cin >> num;
		while(num!=1 && num!=2 && num!=3)
		{
			cout << "1 ~ 3     : ";
			cin >> num;
		}
		srand (time (NULL));
		sq1 = rand()%6; sq1++;
		sq2 = rand()%6; sq2++;

		cout << num <<" . 그 ." <<endl
			 << "   :" << sq1 << endl
			 << "   :" << sq2 << endl
			 << "   : " << sq1+sq2 <<endl;
		if((sq1+sq2)%2==0)
		{
			switch(num)
			{
			case 1:
				if((sq1+sq2)==2 || (sq1+sq2)==12)
				{
					beting*=5;
					cout << " ." <<endl
						 <<"$" <<  money  << " + "<<"$" <<beting<< " = $" << money+beting;
					money+=beting;
				}
				else
				{
					cout << " ."<<endl;
				}
				break;
			
			case 2:
				if((sq1+sq2)==4 || (sq1+sq2)==10)
				{
					beting*=2.5;
					cout << " ." <<endl
						 <<"$" <<  money  << " + "<<"$" <<beting<< " = $" << money+beting;
					money+=beting;
				}
				else
				{
					cout <<	" ."<<endl;
				}
				break;
			
			case 3:
				if((sq1+sq2)==6 || (sq1+sq2)==8)
				{
					beting*=1.5;
					cout << " ." <<endl
						 <<"$" <<  money  << " + "<<"$" <<beting<< " = $" << money+beting;
					money+=beting;
				}
				else
				{
					cout <<" ."<<endl;
				}
				break;
			
			default:
				cout << " ."<<endl;
				break;
			}
		}
		else
			cout <<" ." <<endl;

	}
	cout << "  ." <<endl; 
}
.--Leonardong


Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:31:29
Processing time 0.0082 sec