you cannot perform modulo (%) operation on double and float......check it will not give error with int --
Amol Sharma Third Year Student Computer Science and Engineering MNNIT Allahabad On Tue, Aug 2, 2011 at 5:52 PM, Rajesh Kumar <[email protected]>wrote: > Why this program is showing compilation error? > > #include<stdio.h> > main() > { > float a=3.14; > a=a%3; > double d=6.28; > d=d%4; > } > -- > Regards > Rajesh Kumar > > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
