Click here to Skip to main content
15,905,563 members
Home / Discussions / C#
   

C#

 
QuestionWhy is my .mdb connection not working? Pin
Anonymous2-Oct-05 9:38
Anonymous2-Oct-05 9:38 
AnswerRe: Why is my .mdb connection not working? Pin
Mahesh Kumar V K2-Oct-05 21:39
Mahesh Kumar V K2-Oct-05 21:39 
QuestionGet External Ip Pin
ventomito2-Oct-05 8:37
ventomito2-Oct-05 8:37 
Questionmost efficient way to draw triangle Pin
...---...2-Oct-05 6:04
...---...2-Oct-05 6:04 
AnswerRe: most efficient way to draw triangle Pin
Dave Kreskowiak2-Oct-05 7:12
mveDave Kreskowiak2-Oct-05 7:12 
GeneralRe: most efficient way to draw triangle Pin
...---...2-Oct-05 8:20
...---...2-Oct-05 8:20 
GeneralRe: most efficient way to draw triangle Pin
Dave Kreskowiak2-Oct-05 8:47
mveDave Kreskowiak2-Oct-05 8:47 
GeneralRe: most efficient way to draw triangle Pin
...---...2-Oct-05 9:24
...---...2-Oct-05 9:24 
GeneralRe: most efficient way to draw triangle Pin
Robert Rohde2-Oct-05 19:29
Robert Rohde2-Oct-05 19:29 
QuestionOleDbType cast to BaseType .Net Pin
Gedrain2-Oct-05 3:24
Gedrain2-Oct-05 3:24 
AnswerRe: OleDbType cast to BaseType .Net Pin
Dave Kreskowiak2-Oct-05 7:17
mveDave Kreskowiak2-Oct-05 7:17 
GeneralRe: OleDbType cast to BaseType .Net Pin
Gedrain2-Oct-05 7:21
Gedrain2-Oct-05 7:21 
GeneralRe: OleDbType cast to BaseType .Net Pin
Dave Kreskowiak2-Oct-05 8:29
mveDave Kreskowiak2-Oct-05 8:29 
GeneralRe: OleDbType cast to BaseType .Net Pin
Gedrain2-Oct-05 8:36
Gedrain2-Oct-05 8:36 
GeneralRe: OleDbType cast to BaseType .Net Pin
Dave Kreskowiak2-Oct-05 8:50
mveDave Kreskowiak2-Oct-05 8:50 
QuestionHelp!! monitor bandwidth usage Pin
dunbshy2-Oct-05 3:03
dunbshy2-Oct-05 3:03 
AnswerRe: Help!! monitor bandwidth usage Pin
Dave Kreskowiak2-Oct-05 7:09
mveDave Kreskowiak2-Oct-05 7:09 
GeneralRe: Help!! monitor bandwidth usage Pin
dunbshy2-Oct-05 7:26
dunbshy2-Oct-05 7:26 
GeneralRe: Help!! monitor bandwidth usage Pin
Dave Kreskowiak2-Oct-05 8:45
mveDave Kreskowiak2-Oct-05 8:45 
GeneralRe: Help!! monitor bandwidth usage Pin
dunbshy2-Oct-05 22:51
dunbshy2-Oct-05 22:51 
GeneralRe: Help!! monitor bandwidth usage Pin
Dave Kreskowiak6-Oct-05 11:54
mveDave Kreskowiak6-Oct-05 11:54 
QuestionRoulette Help!!! Pin
ArsNeo2-Oct-05 1:48
ArsNeo2-Oct-05 1:48 
Here my program:

#include <io.h>
#include <stdio.h>
#include <math.h>
#include <time.h>

int main()
{
int bets, bets_made, bet_num[50], betmoney[50];
short roulette_choice, spinval;
double num_bets;
int betcheck = -1;
long cash = 500;

short bet = 0;

while ( !bet )
{
menumain: printf ( "\n\n\n *** Roulette ***\n" );
printf ( "(1): Place a bet\n" );
printf ( "(2): Check your cash\n" );
printf ( "(3): Mortage your house\n" );
printf ( "(4): Quit Roulette\n" );
printf ( "(5): Retire\n" );
printf ( "Please enter your choice: ");
scanf ( "%d", &roulette_choice );
switch (roulette_choice)
{
case 1: printf ( "\n\n\nHow many bets will you place?" );
scanf ( "%d", &num_bets );
num_bets = num_bets - 1;
bets_made = -1;

while (bets_made < num_bets)
{
bets_made++;
beginning:
printf ( "\nWhat number will you place a bet on (0-36)? " );
scanf ( "%d", &bet_num[bets_made] );

if ( 36 < bet_num[bets_made] || 0 > bet_num[bets_made] )
{
goto beginning;
}

printf ( "How much will you bet on number", "%d", &bet_num[bets_made], "?" );
scanf ( "%d", &betmoney[bets_made] );
}
bet= 1;
break;

case 2: printf ( "\n\nYou have $", "%d", &cash, "at this time." );
break;

case 3: printf ( "\n\nI think you need to go cool it for a while." );
return 0;

case 4: printf ( "\n\nReturning to the main menu now." );
return 0;

case 5: return 0;

default: printf ( "\n\nStay away from the bar for a while would ya?" );
goto menumain;

}
}
spinval = rand () %37;
printf ( "\n\n\nThe winning number is ", "%d", &spinval, "!" );

while (betcheck < num_bets )
{
betcheck ++;
if ( bet_num[betcheck] - spinval == 0 )
{
printf ( "\n\n\nYou won with the number ", "%d", &bet_num[betcheck], "!" );
cash = cash + (betmoney[betcheck] * (37.00/num_bets));
bet = betmoney[betcheck] * (37.00/(num_bets + 1));
printf ( "\nYou made $ ");
scanf ( "%d", &bet);
goto main;
}
}

printf ( "\n\nSorry pal, better luck next time\n" );
goto main;
}

Please tell me where is do mistake. Thank you.
AnswerRe: Roulette Help!!! Pin
Dave Kreskowiak2-Oct-05 2:21
mveDave Kreskowiak2-Oct-05 2:21 
GeneralRe: Roulette Help!!! Pin
ArsNeo2-Oct-05 6:47
ArsNeo2-Oct-05 6:47 
GeneralRe: Roulette Help!!! Pin
Dave Kreskowiak2-Oct-05 7:04
mveDave Kreskowiak2-Oct-05 7:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.