On Tue, Aug 2, 2011 at 5:52 PM, Rajesh Kumar <testalgori...@gmail.com>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 > > Change the code as follows > #include<stdio.h> > main() > { > int a=3; > int d=6; > a=a%3; > d=d%4; > } Reason: C didnot allow declararion stmt after other kinds of expns. and also modulo operator will work only for integer variables. > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algogeeks@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com. > 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 algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.