Jump to content

Roulette / Square root C program help!!!

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
4 replies to this topic

#1
madaznfootballer

madaznfootballer

    Newbie

  • Members
  • Pip
  • 4 posts
Hi, I am really stuck on my C Programming homework assignment,


Here's What I have:
https://eee.uci.edu/...assignment5.pdf

Roulette:
Posted Image
Posted Image
Posted Image
Posted Image

Root:
Posted Image
Posted Image
Posted Image

unfortunately i found out about this forum a little late and this assignment is due tomorrow, but any help would be great appreciated thanks!!

#2
madaznfootballer

madaznfootballer

    Newbie

  • Members
  • Pip
  • 4 posts
And i'm only allowed to use #include <stdlib.h> and #include <time.h> for the roulette assignment, and i can't use math library functinos for the root assignment.

#3
John

John

    Writes binary right handed and hex left handed

  • Moderators
  • 6,321 posts
Can you explain in a sentence or two what your having problems with? I really don't feel like reading your assignment and looking at your pictures then trying to deduce myself where you are having difficulty.

#4
madaznfootballer

madaznfootballer

    Newbie

  • Members
  • Pip
  • 4 posts
well for the roulette part i need to get the program to run and have it look like in the assignment exatcly when it runs, as for problems pretty much in the error jpg i attached it sums it up, i can't get it to produce a random number between 1 to 36 properly and the balance is way off.


As for the root one i need it to run x number of iterations (it basically just keeps finding the midpoint until the difference between the calculated midpoint and the actual square root is 0.0000000001) to find out the approximations of the square root of a user inputted integer without the use of math library functions, and my problem is it isn't calculating my formulas as it just simply reads computes the first equation and runs an infinite loop/.

#5
DevilsCharm

DevilsCharm

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 884 posts
Is this like a virtual roulette, text-based, or is it actually a graphic roulette wheel that moves and such.