Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C is hard -.-"

Name: Anonymous 2013-03-09 0:25



float ran();//Returns a float value in the range [0.0,2.0]

int main(int argc, char *argv[]){

  long double return_value=0.0;
  unsigned integer x,y=0;

  y-=1;

  for(x=0;x<y;x++)return_value+=ran();

  return_value/=y;


 return (int)return_value;


}


What are the chances of this program ending correctly?

Name: Anonymous 2013-03-09 2:18

>unsigned integer x,y=0;
>y-=1;

i bet you were a bad boy/girl and pulled the legs off of bugs -_-

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List