Home > Net >  Written in c #, for help
Written in c #, for help

Time:09-24

The number of 10000 thousand digits within hundreds of digits and ten digit number decrease on the reduction of single digit number greater than zero number of CNT, then find out all four digits average pjz1 satisfy this condition, and this condition is not met four digits of the average pjz2, finally the function to output the results,

CodePudding user response:

It is ok to use the substring implements,

CodePudding user response:

 
Int a=num/1000;//one thousand
Int b=num/100% 10;//one hundred
Int num=c/10% 100% 10;//10
Int d=10 num % 1000% 100%;//bits

CodePudding user response:

~ is to let you free to help him doing his homework

CodePudding user response:

reference HerryDong reply: 3/f
is to let you free to help him do homework ~

Homework, stone hammers

CodePudding user response:

 
Static int a;
Static int b;
Static int c;
Static int d;
The static List Counts1=new List (a);
The static List Counts2=new List (a);
The static double pjz1;
The static double pjz2;
The static void Main (string [] args)
{
For (int I=1000; I & lt; 10000; I++)
{
A=I/1000;
B=I % 1000/100;
C=I % 100/10;
D=I % 10;
If (a - b - c - d & gt; 0)
{counts1. Add (I); }
The else
{counts2. Add (I); }
}
Pjz1=counts1. Business ();
Pjz2=counts2. Business ();
Console. WriteLine (pjz1 + ", "+ pjz2);
}
}


The final list?

CodePudding user response:

refer to fifth floor young programmers don's reply:
 
Static int a;
Static int b;
Static int c;
Static int d;
The static List Counts1=new List (a);
The static List Counts2=new List (a);
The static double pjz1;
The static double pjz2;
The static void Main (string [] args)
{
For (int I=1000; I & lt; 10000; I++)
{
A=I/1000;
B=I % 1000/100;
C=I % 100/10;
D=I % 10;
If (a - b - c - d & gt; 0)
{counts1. Add (I); }
The else
{counts2. Add (I); }
}
Pjz1=counts1. Business ();
Pjz2=counts2. Business ();
Console. WriteLine (pjz1 + ", "+ pjz2);
}
}


The final list?

Is in the book of questions after class??

CodePudding user response:

refer to 6th floor qq_45808024 response:
is in the book of questions after class?

You can take to change should be repaired

CodePudding user response:

Has been written, thank you
  •  Tags:  
  • C #
  • Related