Home > Back-end >  Have a great god can help me with the c language to write out ah, thank you
Have a great god can help me with the c language to write out ah, thank you

Time:10-01

CodePudding user response:

What is the end result of this you want

CodePudding user response:

reference 1 floor??????? Pe? Er response:
the end result is what you want

I have to do is to process, is to take c + language have to do is give me the application process

CodePudding user response:

reference 1 floor??????? Pe? Er response:
the end result is what you want

Help me, brother

CodePudding user response:

Let me think about it, ni is on behalf of multiplication

CodePudding user response:

For your reference
 
#include
using namespace std;

Int jiecheng (int n);
Double jiecheng1 (int n);

Int main ()
{
int n;
Double m;
Cout & lt; <"Please enter an integer:" & lt; cin> n;

M=jiecheng1 (n);
Cout & lt; <"The result is:" & lt;

return 0;
}

Int jiecheng (int n)
{
Int I, sum=1;
For (I=1; I<=n; I++)
{
The sum *=I;
}
return sum;
}

Double jiecheng1 (int n)
{
Int I, j, f=1;
Double k=0;
Double sum=0;
For (I=1; I<=n; I++)
{
J=jiecheng (I);
K=1/(double) j;
If (I % 2==0)
{
K=k;
}

The sum +=k;
}
return sum;
}
  • Related