Hi, i need help in c prog not c ++ so please don't tell me c ++ code :D
m_hrs is 8.
hrs is double
hrs= (m_hrs * 20) / 60;
printf(" hrs is %.2lf", hrs);
ans: 2.00 not 2.67
the problem is i am not getting 2.67 but when i calculated with calculator i am getting 2.667.
Thanks for help
m_hrs is 8.
hrs is double
hrs= (m_hrs * 20) / 60;
printf(" hrs is %.2lf", hrs);
ans: 2.00 not 2.67
the problem is i am not getting 2.67 but when i calculated with calculator i am getting 2.667.
Thanks for help
Comment