BoutCheetah

Other => Off Topic => Topic started by: Iridion on November 05, 2012, 01:01:41 PM

Title: little help with c (real number)
Post by: Iridion on November 05, 2012, 01:01:41 PM
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?
Title: Re: little help with c (real number)
Post by: Iridion on November 07, 2012, 02:50:37 PM
cmon :(