Computer Programming || Gaming || Technology || ai

Some uncommon C++ rules


Some uncommon rules given below:

  1. 15/100 will results in an int . to get float or double output you have to make either 15.00/100 or 15/100.00
  2. ans=(-b+sqrt(b*b-4*a*c) )/( 4*a*c ); and ans=(-b+sqrt(b*b-4*a*c) )/4*a*c ; will give different output .Because / will execute first before *.

Have any Question or Comment?

Leave a Reply

Your email address will not be published. Required fields are marked *




Calender

October 2020
M T W T F S S
 1234
567891011
12131415161718
19202122232425
262728293031