Replies
Welcome, guest
Join CrazyEngineers to reply, ask questions, and participate in conversations.
CrazyEngineers powered by Jatra Community Platform
-
@thebigk • Sep 22, 2018
#-Link-Snipped-#Â - I'm not sure what you're trying to do. If you haven't define 'b', it's not going to add up to a.
The output of the following program -
#include <stdio.h>
main()Â
{Â
  float a,b,sum; a=3.087;Â
  sum=a+b;Â
  printf("sum=%f",sum);Â
  return 0;
}
is 3.087000Â
I'm not sure why are you getting 11. Did you write the entire program? Could you check and post again?Â
-
@devika-B7u8yN • Sep 22, 2018
Sorry im getting 3.087000.i dont know what mistake i have done that time
-
@jayt-n9GyP4 • Sep 24, 2018
try to initialize b variable with 0, may be junk values causing the problem.