Home > Back-end >  C language for help
C language for help

Time:05-03

Help to see which wrong

CodePudding user response:

The first if write wrong
 
If (n> M)

CodePudding user response:

The first reply write backwards, it should be
 
If (m> N)

CodePudding user response:

Reference:
 # include 
Void main ()
{
Int m, n, t, I, the sum=0, count=0;
Printf (" Enter m, n: ");
The scanf (" % d % d ", & amp; M, & amp; N);
If (m & gt; {t=m, n) M=n; N=t; }
For (I=m; i<=n; I++)
If (I % 3==0 & amp; & I % 5!=0)
{
The sum +=I;
count++;
}
Printf (" sum=% d; Count=% d \ n ", sum, count);

}

CodePudding user response:

refer to the second floor weixin_57293030 response:
first reply write backwards, it should be
 
If (m> N)

CodePudding user response:

reference 1st floor weixin_57293030 response:

first if write wrong
 
If (n> M)

As if m> n
  • Related