Home > Back-end >  C language subject urgent request
C language subject urgent request

Time:12-04

 everyone a great god hurry for these two problems (C)

CodePudding user response:

His first try, is not difficult problem, if the foundation is solid, write adjust it ~ no problem

CodePudding user response:

This is to help friends examination questions all urgent, if you will can help a bit

CodePudding user response:

refer to the second floor KhaRea response:
it is a bunch of friends of all the nasty, if you will to help me

Simple question, is the exam?

CodePudding user response:

Is so urgent for

CodePudding user response:

For your reference
1
 
Long fun (n)
{
Long a [100]={0}, sum=1, t=0;
Int I=0, j=0;
T=n;
While (t)
{
j++;
T/=10;
}


for (i=0; i{
A [I]=n % 10;
N/a=10;
The sum *=a, [I].
}
Return the sum.
}

The second question:
 
Int max_min (int a [], int n)
{
Int=0, Max min=0, I=0;
Max min==a, [0].
for (i=0; i{
If (Max & lt; A [I])
Max=a, [I].
If (min & gt; A [I])
Min=a, [I].
}
The return of Max * min;
}

CodePudding user response:

This also line,,,,

CodePudding user response:

reference 5 floor CHXCHXKKK reply:

for reference1
 
Long fun (n)
{
Long a [100]={0}, sum=1, t=0;
Int I=0, j=0;
T=n;
While (t)
{
j++;
T/=10;
}


for (i=0; i{
A [I]=n % 10;
N/a=10;
The sum *=a, [I].
}
Return the sum.
}

The second question:
 
Int max_min (int a [], int n)
{
Int=0, Max min=0, I=0;
Max min==a, [0].
for (i=0; i{
If (Max & lt; A [I])
Max=a, [I].
If (min & gt; A [I])
Min=a, [I].
}
The return of Max * min;
}

Where N? This place should be n,

 long fun (n) 
{

Int sum=1;

While (n) {
If (n % 10==0)
return 0;
The sum *=(n % 10);
N/a=10;
}


/*
Long a [100]={0}, sum=1, t=0;
Int I=0, j=0;
T=n;



While (t)
{
j++;
T/=10;
}


for (i=0; i{
A [I]=n % 10;
N/a=10;
The sum *=a, [I].
}
*/
Return the sum.
}


The first is not so complicated, we can simple processing,

CodePudding user response:

The second part USES bubble sort? And then go to the first and second digits multiplication
  • Related