November 25, 2024, 01:56:19 AMLatest Member: Josephwrify
BoutCheetah » Forum » Other » Off Topic » little help with c (real number)

little help with c (real number)

Started by Iridion, November 05, 2012, 01:01:41 PM

Previous topic - Next topic

Iridion

this

  float a,b;
  float res;
 
  a=7.5;
  b=2.0;
 
  res=a/b;
 
  printf("%d\n", res);

gives 0. why and how do i represent real numbers correctly?


Quote from: Madproxyes because Iri & Kp can change the rules!
thats how we roll maddie

Iridion



Quote from: Madproxyes because Iri & Kp can change the rules!
thats how we roll maddie

Copyright © ZylonGaming 2009 - 2024
-Terms of Use-