As is known to all, points in three-dimensional space can be expressed via space rectangular coordinates.There is a program, Point.java, in which I define a class named Point and do some simple operations on it.
//Point.java
public class Point
{
int x, y, z; //3 coordinates of a point
Point(int _x, int _y, int _z) //Constructor
{
x = _x;
y = _y;
z = _z;
}
//To set the value of x, y and z coordinates
void setx(int _x)
{
x = _x;
}
void sety(int _y)
{
y = _y;
}
void setz(int _z)
{
z = _z;
}
//To calculate the square of distance between origin and the point
int SquareOfDistance()
{
return x * x + y * y + z * z;
}
//To test the program
public static void main(String[] args)
{
Point point = new Point(3, 4, 5);
System.out.println("The coordinate of this point is (" + point.x + "," + point.y + "," + point.z + "),and the square of distance between origin and the point is " + point.SquareOfDistance() + ".");
point.setx(1);
point.sety(2);
point.setz(3);
System.out.println("The coordinate of this new point is (" + point.x + "," + point.y + "," + point.z + "),and the square of distance between origin and the point is " + point.SquareOfDistance() + ".");
}
}
The running results are following:
The coordinate of this point is (3,4,5),and the square of distance between origin and the point is 50.
The coordinate of this new point is (1,2,3),and the square of distance between origin and the point is 14.
Have you had a try?
Saturday, November 21, 2015
Wednesday, November 18, 2015
What's Wrong With C4droid?
As an Android phone user,meanwhile a programming learner,I have got to seek for compilers which can be setup on my phone.I used C4droid to compile and run programs before,with its inside compiler TCC,GCC and G++,mainly to practice C language.However,some terrible things happened.
About the problem related to "int a[10];",which I mentioned in my blogs before,I consulted several people,but there was no exact conclusion.But I found that when I change the compiler TCC to GCC or G++,that problem disappeared.As expected, it's associated with the compiler.As to exact reason,I don't know.
What's worth,I run a C++ program by G++ successfully a few days ago,but it couldn't be run today.It's a simple program about conversion of one's height.
//Conversion Of Your Height
#include <iostream>
int main(void)
{
using namespace std;
int inchheight,foot,inch;
const int ConversionFactor=12;
cout<<"Input your height in inches(only integer allowed):__\b\b";
cin>>inchheight;
foot = inchheight / ConversionFactor;
inch = inchheight % ConversionFactor;
cout<<"You are "<<foot<<" feet(foot) "<<inch <<" inch(es) high."<<endl;
return 0;
}
Here I just display the errors shown on the screen.
What's wrong with C4droid?
About the problem related to "int a[10];",which I mentioned in my blogs before,I consulted several people,but there was no exact conclusion.But I found that when I change the compiler TCC to GCC or G++,that problem disappeared.As expected, it's associated with the compiler.As to exact reason,I don't know.
What's worth,I run a C++ program by G++ successfully a few days ago,but it couldn't be run today.It's a simple program about conversion of one's height.
//Conversion Of Your Height
#include <iostream>
int main(void)
{
using namespace std;
int inchheight,foot,inch;
const int ConversionFactor=12;
cout<<"Input your height in inches(only integer allowed):__\b\b";
cin>>inchheight;
foot = inchheight / ConversionFactor;
inch = inchheight % ConversionFactor;
cout<<"You are "<<foot<<" feet(foot) "<<inch <<" inch(es) high."<<endl;
return 0;
}
Here I just display the errors shown on the screen.
What's wrong with C4droid?

Thursday, November 12, 2015
Funny C Program:The Result Is Exactly The Same As Source Code!
Have you ever seen programs whose running results are absolutely the same as their source codes?Or do you think it is amazing for this phenomenon?Let's have a try.
//The Result Is Exactly The Same As Source Code
main(){char*a="main(){char*a=%c%s%c;printf(a,34,a,34);}";printf(a,34,a,34);}
Don't modify it,even adding a space,then run it.What surprise do you find?Is the result like the following?
Since finding this funny program,I try to explain it.
It seems this program is so simple,with too less code.You can say like this in a way,but in another way,do you understand this simple program?
In the main function,a character pointer,a,is defined,which points to the character string "main(){char*a=%c%s%c;printf(a,34,a,34);}".Then the statement "printf(a,34,a,34);" is run.Of course,two 'a' in the bracket point to the string.So this statement is equivalent to "printf("main(){char*a=%c%s%c;printf(a,34,a,34);}",34,"main(){char*a=%c%s%c;printf(a,34,a,34);}",34);".34 is the ASCII code of double quote,so the computer prints out the sentence:main(){char*a="main(){char*a=%c%s%c;printf(a,34,a,34);}";printf(a,34,a,34);},which is what you see on the screen,meanwhile the source code.
Is it funny?Have you learned something from this program?Enjoy it!
In the main function,a character pointer,a,is defined,which points to the character string "main(){char*a=%c%s%c;printf(a,34,a,34);}".Then the statement "printf(a,34,a,34);" is run.Of course,two 'a' in the bracket point to the string.So this statement is equivalent to "printf("main(){char*a=%c%s%c;printf(a,34,a,34);}",34,"main(){char*a=%c%s%c;printf(a,34,a,34);}",34);".34 is the ASCII code of double quote,so the computer prints out the sentence:main(){char*a="main(){char*a=%c%s%c;printf(a,34,a,34);}";printf(a,34,a,34);},which is what you see on the screen,meanwhile the source code.
Is it funny?Have you learned something from this program?Enjoy it!
Wednesday, November 11, 2015
Funny C Program:Calculating the Factorial of A Large Number
Maybe you will think,"how simple to calculate the factorial of a number!"And you just write a program like the following.
//Calculating the Factorial of A Large Number v1
#include <stdio.h>
unsigned long long int Factorial(unsigned long long int j);
int main(void)
{
unsigned long long int i;
printf("Input a nonnegative integer:");
scanf("%llu",&i);
printf("%llu!=%llu\n",i,Factorial(i));
return 0;
}
unsigned long long int Factorial(unsigned long long int j)
{
unsigned long long int k,result=1;
for(k=2;k<=j;k++)
result*=k;
return result;
}
Since we use "%llu" to control the formats of these numbers,we have acturally considered the precision.So there is priviously a problem,"as i becomes larger and larger,can the factorial of i be printed accurately?"Of course no,for numbers are stored in a computer with specific ranges the compiler allows.Here is an example of wrong result.
It's obvious that last digit of 25! should be 0,but in this result not.
Then,are there any ways to avoid accuracy losses?
Remenber how we expressed a number in the program Wenquxing Guessing Game?Through an array with enough elements,we can easily store a large number and print it.Then the improved code is following.
//Calculating the Factorial of A Large Number v2
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#define N 100
//N means the maximal number of digits allowed for the value of a factorial
void OutputFactorial(int j);
int main(void)
{
int i;
do
printf("Input a nonnegative integer less than or equal to %d(maximum of int type):",INT_MAX);
while (scanf("%d",&i)!=1||i<0);
OutputFactorial(i);
printf("\n");
return 0;
}
void OutputFactorial(int j)
{
int k,m,carry=0,digit=1,array[N] ;
array[0]=1;
for(k=2;k<=j;k++)
{
for(m=0;m<digit;m++)
{
array[m]=array[m]*k+carry;
carry=array[m]/10;
array[m]%=10;
}
while (carry)
{
array[digit++]=carry%10;
carry/=10;
}
}
if (digit<=N)
{
printf("%d!=",j);
while (digit>=1)
printf("%d",array[--digit]);
}
else
printf("Sorry.The factorial has more than %d digits.It's not intended to output the result.",N);
}
Through this program,I did calculate some factorials successfully.But it seemed that the program didn't run as expected when I input a number out of range.For example,when I input the number 100,the result was beyond expection.
//Calculating the Factorial of A Large Number v3
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#define N 100
//N means the maximal number of digits allowed for the value of a factorial
void OutputFactorial(int j);
int main(void)
{
int i;
do
printf("Input a nonnegative integer less than or equal to %d(maximum of int type):",INT_MAX);
while (scanf("%d",&i)!=1||i<0);
OutputFactorial(i);
printf("\n");
return 0;
}
void OutputFactorial(int j)
{
int k,m,carry=0,digit=1,array[N] ;
array[0]=1;
for(k=2;k<=j;k++)
{
for(m=0;m<digit;m++)
{
array[m]=array[m]*k+carry;
carry=array[m]/10;
array[m]%=10;
}
while (carry>0&&digit<N)
{
array[digit++]=carry%10;
carry/=10;
}
}
if (digit>=N&&carry>0)
printf("Sorry.The factorial has more than %d digits.It's not intended to output the result.",N);
else
{
printf("%d!=",j);
while (digit>=1)
printf("%d",array[--digit]);
}
}
Do you know why I modified the program like this? I defined an array with N elements in the function OutputFactorial(j) but didn't check whether the subscript was out of range in the loop of 2nd version.So trouble came.
Although the 3rd version is improved,it remains some problems.For instance,if you input a character,not a number,then the program will fall into an endless loop.Actually,it's a problem caused by buffer.What's worse,theoretically the program could calculate the factorial of a number as large as INT_MAX,but the efficiency is extremely low so it's impossible for us to wait.In the meantime,It's assumed that the number inputted is not larger than INT_MAX,so the robustness of this program needs to be improved.
Do you have any ideas better than mine?Welcome to share!
//Calculating the Factorial of A Large Number v1
#include <stdio.h>
unsigned long long int Factorial(unsigned long long int j);
int main(void)
{
unsigned long long int i;
printf("Input a nonnegative integer:");
scanf("%llu",&i);
printf("%llu!=%llu\n",i,Factorial(i));
return 0;
}
unsigned long long int Factorial(unsigned long long int j)
{
unsigned long long int k,result=1;
for(k=2;k<=j;k++)
result*=k;
return result;
}
Since we use "%llu" to control the formats of these numbers,we have acturally considered the precision.So there is priviously a problem,"as i becomes larger and larger,can the factorial of i be printed accurately?"Of course no,for numbers are stored in a computer with specific ranges the compiler allows.Here is an example of wrong result.
It's obvious that last digit of 25! should be 0,but in this result not.
Then,are there any ways to avoid accuracy losses?
Remenber how we expressed a number in the program Wenquxing Guessing Game?Through an array with enough elements,we can easily store a large number and print it.Then the improved code is following.
//Calculating the Factorial of A Large Number v2
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#define N 100
//N means the maximal number of digits allowed for the value of a factorial
void OutputFactorial(int j);
int main(void)
{
int i;
do
printf("Input a nonnegative integer less than or equal to %d(maximum of int type):",INT_MAX);
while (scanf("%d",&i)!=1||i<0);
OutputFactorial(i);
printf("\n");
return 0;
}
void OutputFactorial(int j)
{
int k,m,carry=0,digit=1,array[N] ;
array[0]=1;
for(k=2;k<=j;k++)
{
for(m=0;m<digit;m++)
{
array[m]=array[m]*k+carry;
carry=array[m]/10;
array[m]%=10;
}
while (carry)
{
array[digit++]=carry%10;
carry/=10;
}
}
if (digit<=N)
{
printf("%d!=",j);
while (digit>=1)
printf("%d",array[--digit]);
}
else
printf("Sorry.The factorial has more than %d digits.It's not intended to output the result.",N);
}
Through this program,I did calculate some factorials successfully.But it seemed that the program didn't run as expected when I input a number out of range.For example,when I input the number 100,the result was beyond expection.
How can we explain the wrong result?To find the bug,I read the code carefully.And finally I
give the 3rd version.//Calculating the Factorial of A Large Number v3
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#define N 100
//N means the maximal number of digits allowed for the value of a factorial
void OutputFactorial(int j);
int main(void)
{
int i;
do
printf("Input a nonnegative integer less than or equal to %d(maximum of int type):",INT_MAX);
while (scanf("%d",&i)!=1||i<0);
OutputFactorial(i);
printf("\n");
return 0;
}
void OutputFactorial(int j)
{
int k,m,carry=0,digit=1,array[N] ;
array[0]=1;
for(k=2;k<=j;k++)
{
for(m=0;m<digit;m++)
{
array[m]=array[m]*k+carry;
carry=array[m]/10;
array[m]%=10;
}
while (carry>0&&digit<N)
{
array[digit++]=carry%10;
carry/=10;
}
}
if (digit>=N&&carry>0)
printf("Sorry.The factorial has more than %d digits.It's not intended to output the result.",N);
else
{
printf("%d!=",j);
while (digit>=1)
printf("%d",array[--digit]);
}
}
Do you know why I modified the program like this? I defined an array with N elements in the function OutputFactorial(j) but didn't check whether the subscript was out of range in the loop of 2nd version.So trouble came.
Although the 3rd version is improved,it remains some problems.For instance,if you input a character,not a number,then the program will fall into an endless loop.Actually,it's a problem caused by buffer.What's worse,theoretically the program could calculate the factorial of a number as large as INT_MAX,but the efficiency is extremely low so it's impossible for us to wait.In the meantime,It's assumed that the number inputted is not larger than INT_MAX,so the robustness of this program needs to be improved.
Do you have any ideas better than mine?Welcome to share!
Singles' Day:What Has It Brought Us?
Before the main body,I'd like to ask you a question,"do you know the festival Singles' Day?"If not,it might has brought you nothing.Even if you know something about it,it might hasn't brought you anything,either.Let's begin with the origin of Singles' Day.
It's commonly accepted that Singles's Day derived from campus culture of Nanjing University in China.There was a dormitory with four single men,who talked about how to get rid of the single state every night during a period.When talking,they imagined to organize an activity on the base of upcoming November 11th,which they called Singles's Day later on.From then on,this festival was widely spread and became more and more popular.Why they chose November 11th?Because there were four "1" on the day 11/11,which were like singles.
As time went by,the Singles' Day has been celebrated by more and more people,but Chinese only.
Firstly,the young hold parties for ridding themselves of single states,or to make new friends preparing for saying goodbye to singleness.Young people show their happy desires.
Secondly,so many shopping websites discount to promote sales on Singles' Day,since Taobao and Tmall being the first in 2009.It now has become the largest shopping day in the world.
There is no doubt that we benefit a lot from the Singles' Day.However,problems always come along with the benefits,so there are some problems meanwhile.
This festival,with strong atmosphere getting rid of singleness,makes some singles feel more alone.On the other hand,crazy shopping activities have some bad influences,such as busy work for couriers.What's worth,it has serious impacts to some other countries.It's reported that there is a shortage of milk powder in Australia because of the panic buying of many Chinese,which makes some local parents can't buy milk powder for their children.And there are some other problems,too.
What's your opinion to the Singles' Day?What has it brought us?Welcome to share your thoughts with others.
It's commonly accepted that Singles's Day derived from campus culture of Nanjing University in China.There was a dormitory with four single men,who talked about how to get rid of the single state every night during a period.When talking,they imagined to organize an activity on the base of upcoming November 11th,which they called Singles's Day later on.From then on,this festival was widely spread and became more and more popular.Why they chose November 11th?Because there were four "1" on the day 11/11,which were like singles.
As time went by,the Singles' Day has been celebrated by more and more people,but Chinese only.
Firstly,the young hold parties for ridding themselves of single states,or to make new friends preparing for saying goodbye to singleness.Young people show their happy desires.
Secondly,so many shopping websites discount to promote sales on Singles' Day,since Taobao and Tmall being the first in 2009.It now has become the largest shopping day in the world.
There is no doubt that we benefit a lot from the Singles' Day.However,problems always come along with the benefits,so there are some problems meanwhile.
This festival,with strong atmosphere getting rid of singleness,makes some singles feel more alone.On the other hand,crazy shopping activities have some bad influences,such as busy work for couriers.What's worth,it has serious impacts to some other countries.It's reported that there is a shortage of milk powder in Australia because of the panic buying of many Chinese,which makes some local parents can't buy milk powder for their children.And there are some other problems,too.
What's your opinion to the Singles' Day?What has it brought us?Welcome to share your thoughts with others.
Monday, November 9, 2015
Funny C Program:Wenquxing Guessing Game
Wenquxing guessing game,the rules of which are simple,is not very easy for us.
In this game,computer gives a random number with four digits,each of which is different from the others,and we assumpt the top one can be 0.Then the player guesses it until he or she guesses rightly or guesses wrongly within a specific number of times determined by your inputing.Of course,there are hints after every guessing,which are like this,"xAyB".x is the number of digits guessed with right digits and positions,and there is/are y right digit(s) with wrong position(s).Do you want to write this game by yourself and play it?At least I do.
//Wenquxing Guessing Game
#include <stdio.h>
#include <time.h>
void MakeDigit(int a[4]);//Computer gives a random number
void InputDigit(int b[4]);//Player input a number
int IsRightPosition(int a[4],int b[4]);//Calculate how many correct digits guessed with right positions
int IsRightDigit(int a[4],int b[4]);//Calculate how many correct digits guessed with whether right or wrong positions
int main(void)
{
int level,count=0,rightPosition,rightDigit,a[4],b[4];
MakeDigit(a);
do
{
printf("How many times do you want to guess?Please input a positive integer:");
scanf("%d",&level);
}
while (level<=0);
do
{
printf("No.%d of %d times\n",count,level);
InputDigit(b);
count++;
rightPosition=IsRightPosition(a,b);
rightDigit=IsRightDigit(a,b)-rightPosition;
printf("%dA%dB\n",rightPosition,rightDigit);
}
while (rightPosition<4&&count<level );
if (rightPosition==4)
printf("Congratulations.You guessed the right number at No.%d.\n",count);
else
printf("Sorry.You didn't guess the right number.See you next time!\n");
printf("Correct answer is:");
for(count=0;count<4;count++)
printf("%d",a[count]);
return 0;
}
void MakeDigit(int a[4])
{
int i,j;
srand(time(NULL));
for (i=0;i<4;i++)
{
Repeata:
a[i]=rand()%10;
for (j=0;j<i;j++)
if (a[j]==a[i])
goto Repeata;
}
}
void InputDigit(int b[4])
{
int k,m,n;
do
{
Repeatb:
printf("Input your guess with four digits,each of which should be different from the others(top digit 0 allowed):");
scanf("%d",&k);
for (m=3;m>=0;m--)
{
b[m]=k%10;
k/=10;
for (n=3;n>m;n--)
if (b[n]==b[m])
goto Repeatb;
}
}
while (k<0||k>=10000);
}
int IsRightPosition(int a[4],int b[4])
{
int r,s=0;
for (r=0;r<4;r++)
if (a[r]==b[r])
s++;
return s;
}
int IsRightDigit(int a[4],int b[4])
{
int x,y,z=0;
for (x=0;x<4;x++)
for (y=0;y<4;y++)
if (a[x]==b[y])
z++;
return z;
}
Seems simple,right?Have fun with it!
In this game,computer gives a random number with four digits,each of which is different from the others,and we assumpt the top one can be 0.Then the player guesses it until he or she guesses rightly or guesses wrongly within a specific number of times determined by your inputing.Of course,there are hints after every guessing,which are like this,"xAyB".x is the number of digits guessed with right digits and positions,and there is/are y right digit(s) with wrong position(s).Do you want to write this game by yourself and play it?At least I do.
//Wenquxing Guessing Game
#include <stdio.h>
#include <time.h>
void MakeDigit(int a[4]);//Computer gives a random number
void InputDigit(int b[4]);//Player input a number
int IsRightPosition(int a[4],int b[4]);//Calculate how many correct digits guessed with right positions
int IsRightDigit(int a[4],int b[4]);//Calculate how many correct digits guessed with whether right or wrong positions
int main(void)
{
int level,count=0,rightPosition,rightDigit,a[4],b[4];
MakeDigit(a);
do
{
printf("How many times do you want to guess?Please input a positive integer:");
scanf("%d",&level);
}
while (level<=0);
do
{
printf("No.%d of %d times\n",count,level);
InputDigit(b);
count++;
rightPosition=IsRightPosition(a,b);
rightDigit=IsRightDigit(a,b)-rightPosition;
printf("%dA%dB\n",rightPosition,rightDigit);
}
while (rightPosition<4&&count<level );
if (rightPosition==4)
printf("Congratulations.You guessed the right number at No.%d.\n",count);
else
printf("Sorry.You didn't guess the right number.See you next time!\n");
printf("Correct answer is:");
for(count=0;count<4;count++)
printf("%d",a[count]);
return 0;
}
void MakeDigit(int a[4])
{
int i,j;
srand(time(NULL));
for (i=0;i<4;i++)
{
Repeata:
a[i]=rand()%10;
for (j=0;j<i;j++)
if (a[j]==a[i])
goto Repeata;
}
}
void InputDigit(int b[4])
{
int k,m,n;
do
{
Repeatb:
printf("Input your guess with four digits,each of which should be different from the others(top digit 0 allowed):");
scanf("%d",&k);
for (m=3;m>=0;m--)
{
b[m]=k%10;
k/=10;
for (n=3;n>m;n--)
if (b[n]==b[m])
goto Repeatb;
}
}
while (k<0||k>=10000);
}
int IsRightPosition(int a[4],int b[4])
{
int r,s=0;
for (r=0;r<4;r++)
if (a[r]==b[r])
s++;
return s;
}
int IsRightDigit(int a[4],int b[4])
{
int x,y,z=0;
for (x=0;x<4;x++)
for (y=0;y<4;y++)
if (a[x]==b[y])
z++;
return z;
}
Seems simple,right?Have fun with it!
Sunday, November 8, 2015
Funny C Program:Summary of Zhishen Lu Eating Steamed Bun
Hello,my friends.Through the series of "Funny C Program:Zhishen Lu Eating Steamed Bun",do you gain anything?I'm going to summarize in this article.
Firstly,I feel fortunate to have been so interested in solving this problem through C language.As the saying goes,"interest is the best teacher."Strong interest made me insist on thinking about this problem.And I am very happy to have finished this series.
Secondly,I did learn a lot from these small about 20-line programs.I enjoyed the process in spite of many mistakes and barriers."To find a problem is far more important than to solve the problem,"as Einstein said.And I had great senses of achievement after every step forward.
Thirdly,the key of this problem lies in how to write the loop control statements,for which I struggled many times.I knew the importance of problem understanding and algorithm design from this living example.
Last but not least,is "int a[10]={0};" valid or not?I'm expecting you readers to discuss it with me.Thanks.
Oh,no.It's necessary for me to say something more about this problem after discussing.The thought of it comes from Josephus problem,which is very famous.As for more details about it,you can search on the Internet.
Firstly,I feel fortunate to have been so interested in solving this problem through C language.As the saying goes,"interest is the best teacher."Strong interest made me insist on thinking about this problem.And I am very happy to have finished this series.
Secondly,I did learn a lot from these small about 20-line programs.I enjoyed the process in spite of many mistakes and barriers."To find a problem is far more important than to solve the problem,"as Einstein said.And I had great senses of achievement after every step forward.
Thirdly,the key of this problem lies in how to write the loop control statements,for which I struggled many times.I knew the importance of problem understanding and algorithm design from this living example.
Last but not least,is "int a[10]={0};" valid or not?I'm expecting you readers to discuss it with me.Thanks.
Oh,no.It's necessary for me to say something more about this problem after discussing.The thought of it comes from Josephus problem,which is very famous.As for more details about it,you can search on the Internet.
Saturday, November 7, 2015
Funny C Program:Comparison Between Zhishen Lu Eating Steamed Bun v5 and v6
Acturally,I mentioned the difference between the 5th version and 6th one in Funny C Program:Zhishen Lu Eating Steamed Bun v6,so I am not going to repeat it.Let's discuss whether to assign values to every array element one by one through a loop statement or not.To find the reasonable explanation,I tested a few programs on C4droid.
//Testing program 1
#include <stdio.h>
int main(void)
{
int i,array[101]={0};
for(i=1;i<101;i++)
printf(" %d",array[i]);
return 0;
}
Following is the result.
What?It depends on the scale of the array?
I was puzzled,and modified the code like testing program 2.
//Testing program 2
#include <stdio.h>
int main(void)
{
int i,array[3]={0};
for(i=0;i<3;i++)
printf(" %d",array[i]);
printf("\n");
return 0;
}
The result is following.
It seemed that scale of the array did influence the result.To convince myself,testing program 3 came into being.Of course there were many other testing programs which I'm unable to show to you one after another.
//Testing program 3
#include <stdio.h>
int main(void)
{
int i,array[6]={0};
for(i=0;i<6;i++)
printf(" %d",array[i]);
printf("\n");
return 0;
}
And the result is following.
As expected,not all the elements equal 0.
How can we explain it?Maybe it's because different compilers deal with "int a[10]={0};" variously,I think.To avoid mistakes,why not write a loop statement?I'm sorry that I didn't want to write another circle statement,so the mistake appeared.But I feel lucky for learning so much from it.
Of course,if you understand the exact explanation of this mistake,welcome to post a comment or email me at jimzhou001@gmail.com.Thank you!
#include <stdio.h>
int main(void)
{
int i,array[101]={0};
for(i=1;i<101;i++)
printf(" %d",array[i]);
return 0;
}
Following is the result.
I was puzzled,and modified the code like testing program 2.
//Testing program 2
#include <stdio.h>
int main(void)
{
int i,array[3]={0};
for(i=0;i<3;i++)
printf(" %d",array[i]);
printf("\n");
return 0;
}
The result is following.
It seemed that scale of the array did influence the result.To convince myself,testing program 3 came into being.Of course there were many other testing programs which I'm unable to show to you one after another.
//Testing program 3
#include <stdio.h>
int main(void)
{
int i,array[6]={0};
for(i=0;i<6;i++)
printf(" %d",array[i]);
printf("\n");
return 0;
}
And the result is following.
How can we explain it?Maybe it's because different compilers deal with "int a[10]={0};" variously,I think.To avoid mistakes,why not write a loop statement?I'm sorry that I didn't want to write another circle statement,so the mistake appeared.But I feel lucky for learning so much from it.
Of course,if you understand the exact explanation of this mistake,welcome to post a comment or email me at jimzhou001@gmail.com.Thank you!
Friday, November 6, 2015
Funny C Program:Zhishen Lu Eating Steamed Bun v6
Because of my puzzle,I'd like to share the modified code straightly,hoping you can explain why to alter like this.
//Zhishen Lu Eating Steamed Bun v6
#include <stdio.h>
int main(void)
{
int monk[101],count=0,steabun=0,i;//Easy to count.monk[1]~monk[100] for the flower monk Zhishen Lu and other 99 monks,count to number off,steabun for the number of steamed buns already divided and i as a simple counter.
for (i=1;i<101;i++)
monk[i]=0;//Initialization of the array.Value 0 means they will participate in numbering off.
i=0;
while (steabun<99)
{
if (++i<=100&&!monk[i])//Make sure that the monk hasn't got a steamed bun yet
{
if (++count%5==0)
{
monk[i]=1;//Get a steamed bun
steabun++;
}
}
else if (i>100)
i=0;//Make sure to mumber off continuously
}
for(i=1;monk[i];i++) ;//Do you know why ";" exists?
printf("The position number of Zhishen Lu is %d.\n",i);
return 0;
}
Find any differences between the 6th version and the 5th one?
Right,we initialised monk[1] to monk[100] through a "for" circle in the latest version while not when defining the array.
But I learned from the textbook that an array could be defined and initialized like this:"int a[10]={0};"which means every array element equals 0.Then what's wrong with the 5th version?If interested,pay attention to my posts.
But I learned from the textbook that an array could be defined and initialized like this:"int a[10]={0};"which means every array element equals 0.Then what's wrong with the 5th version?If interested,pay attention to my posts.
Funny C Program:Zhishen Lu Eating Steamed Bun v5
"If the two conditions of judgement mentioned in the previous version are combined together,will the problem be solved?"I asked myself.Then I tried to make it again and again.
The process was tough.You might notice that in the previous version,expressions in brackets are both in contrast to the right conditions to continuously number off.As I tried to put them together,using "&&" or "||" was a thorny problem.I tried many times,but still in vain.Eventually,I noticed that the right condition is very certain.Why not number off directly as the expression meets the condition?As to other cases,consider them expectly.
Here comes the 5th version of this program.
//Zhishen Lu Eating Steamed Bun v5
#include <stdio.h>
int main(void)
{
int monk[101]={0},count=0,steabun=0,i=0;//Easy to count.monk[1]~monk[100] for the flower monk Zhishen Lu and other 99 monks,value 0 means they will participate in numbering off.count to number off,steabun for the number of steamed buns already divided and i as a simple counter.
while (steabun<99)
{
if (++i<=100&&!monk[i])//Make sure that the monk hasn't got a steamed bun yet
{
if (++count%5==0)
{
monk[i]=1;//Get a steamed bun
steabun++;
}
}
else if (i>100)
i=0;//Make sure to mumber off continuously
}
for(i=1;monk[i];i++) ;//Do you know why ";" exists?
printf("The position number of Zhishen Lu is %d.\n",i);
return 0;
}
How about this version?Seems perfect?No!
The screen showed nothing at all when running this program.
But I couldn't discover the errors by myself.I looked for help from a friend,and the problem was solved successfully.But it's not convictive enough,I thought.Want to know more about the next version?It's coming soon!
The process was tough.You might notice that in the previous version,expressions in brackets are both in contrast to the right conditions to continuously number off.As I tried to put them together,using "&&" or "||" was a thorny problem.I tried many times,but still in vain.Eventually,I noticed that the right condition is very certain.Why not number off directly as the expression meets the condition?As to other cases,consider them expectly.
Here comes the 5th version of this program.
//Zhishen Lu Eating Steamed Bun v5
#include <stdio.h>
int main(void)
{
int monk[101]={0},count=0,steabun=0,i=0;//Easy to count.monk[1]~monk[100] for the flower monk Zhishen Lu and other 99 monks,value 0 means they will participate in numbering off.count to number off,steabun for the number of steamed buns already divided and i as a simple counter.
while (steabun<99)
{
if (++i<=100&&!monk[i])//Make sure that the monk hasn't got a steamed bun yet
{
if (++count%5==0)
{
monk[i]=1;//Get a steamed bun
steabun++;
}
}
else if (i>100)
i=0;//Make sure to mumber off continuously
}
for(i=1;monk[i];i++) ;//Do you know why ";" exists?
printf("The position number of Zhishen Lu is %d.\n",i);
return 0;
}
How about this version?Seems perfect?No!
The screen showed nothing at all when running this program.
But I couldn't discover the errors by myself.I looked for help from a friend,and the problem was solved successfully.But it's not convictive enough,I thought.Want to know more about the next version?It's coming soon!
Wednesday, November 4, 2015
Funny C Program:Zhishen Lu Eating Steamed Bun v4
Maybe you have already been impatient,or you got the right answer through your own efforts.However,the steps of my sharing will not stop.
Since if-else statement can't prevent "while" circle increasing i to101,why not swap their places?Putting the if-else statement behind the "while" circle could effectively avoid i becoming greater than 100.
Following is the source code.
//Zhishen Lu Eating Steamed Bun v4
#include <stdio.h>
int main(void)
{
int monk[101]={0},count=0,steabun=0,i=0;//Easy to count.monk[1]~monk[100] for the flower monk Zhishen Lu and other 99 monks,value 0 means they will participate in numbering off.count to number off,steabun for the number of steamed buns already divided and i as a simple counter.
while (steabun<99)
{
while (monk[i])
i++;//Make sure that the monk hasn't got a steamed bun yet
if (i<100)
i++;
else
i=1;//Make sure to mumber off continuously
if (++count%5==0)
{
monk[i]=1;//Get a steamed bun
steabun++;
}
}
for(i=1;monk[i];i++) ;//Do you know why ";" exists?
printf("The position number of Zhishen Lu is %d.\n",i);
return 0;
}
Facts showed that I was in vain.You may have run the program,so what sentence was on the screen?"The position number of Zhishen Lu is 1."It looked like that I returned to the origin.
Acturally,after every circle,i is reset to 1 and the elder,who is the first monk,will participate in numbering off regardless of the value of monk[1].In the meantime,if monk[100] equals 1,"while" circle will add 1 to i,which means the compiler is going to determine whether the value of monk[101] equals 0 or not.That's what we don't expect.
Since if-else statement can't prevent "while" circle increasing i to101,why not swap their places?Putting the if-else statement behind the "while" circle could effectively avoid i becoming greater than 100.
Following is the source code.
//Zhishen Lu Eating Steamed Bun v4
#include <stdio.h>
int main(void)
{
int monk[101]={0},count=0,steabun=0,i=0;//Easy to count.monk[1]~monk[100] for the flower monk Zhishen Lu and other 99 monks,value 0 means they will participate in numbering off.count to number off,steabun for the number of steamed buns already divided and i as a simple counter.
while (steabun<99)
{
while (monk[i])
i++;//Make sure that the monk hasn't got a steamed bun yet
if (i<100)
i++;
else
i=1;//Make sure to mumber off continuously
if (++count%5==0)
{
monk[i]=1;//Get a steamed bun
steabun++;
}
}
for(i=1;monk[i];i++) ;//Do you know why ";" exists?
printf("The position number of Zhishen Lu is %d.\n",i);
return 0;
}
Facts showed that I was in vain.You may have run the program,so what sentence was on the screen?"The position number of Zhishen Lu is 1."It looked like that I returned to the origin.
Acturally,after every circle,i is reset to 1 and the elder,who is the first monk,will participate in numbering off regardless of the value of monk[1].In the meantime,if monk[100] equals 1,"while" circle will add 1 to i,which means the compiler is going to determine whether the value of monk[101] equals 0 or not.That's what we don't expect.
Tuesday, November 3, 2015
Funny C Program:Zhishen Lu Eating Steamed Bun v3
As far as I am concerned,this is really a tough problem.Whether there is obvious significance,the interest drove me to insist on solving this problem.
I analyzed the code carefully.Surprisingly,I found that the 2th program can only be run rightly when monk[100] equals 0.That is to say,on the condition that monk[100] equals 1,the statement "i++;" will be run.Then what will happen?Obviously the code should be corrected further.
Here is the 3rd version.
//Zhishen Lu Eating Steamed Bun v3
#include <stdio.h>
int main(void)
{
int monk[101]={0},count=0,steabun=0,i=0;//Easy to count.monk[1]~monk[100] for the flower monk Zhishen Lu and other 99 monks,value 0 means they will participate in numbering off.count to number off,steabun for the number of steamed buns already divided and i as a simple counter.
while (steabun<99)
{
if (i<100)
i++;
else
i=1;//Make sure to mumber off continuously
while (monk[i])
i++;//Make sure that the monk hasn't got a steamed bun yet
if (++count%5==0)
{
monk[i]=1;//Get a steamed bun
steabun++;
}
}
for(i=1;monk[i];i++) ;//Do you know why ";" exists?
printf("The position number of Zhishen Lu is %d.\n",i);
return 0;
}
Does it seem better?Compile and run it,please.
Screen shows the same as that of the previous version!
Amazed?Lost?Cogitate!
The if-else statement does make sure the range of i from 1 to 100,but the "while" statement doesn't.Have you found it?
Yes,when i equals 99,through if-else statement,i becomes 100,but when monk[100] doesn't equal 0,"i++;" statement in the loop will be run.Are you familiar with this process?Right,it's not different from the 2nd version in substance.
Therefore,how can we deal with it on earth?Wait for my next version,please.
I analyzed the code carefully.Surprisingly,I found that the 2th program can only be run rightly when monk[100] equals 0.That is to say,on the condition that monk[100] equals 1,the statement "i++;" will be run.Then what will happen?Obviously the code should be corrected further.
Here is the 3rd version.
//Zhishen Lu Eating Steamed Bun v3
#include <stdio.h>
int main(void)
{
int monk[101]={0},count=0,steabun=0,i=0;//Easy to count.monk[1]~monk[100] for the flower monk Zhishen Lu and other 99 monks,value 0 means they will participate in numbering off.count to number off,steabun for the number of steamed buns already divided and i as a simple counter.
while (steabun<99)
{
if (i<100)
i++;
else
i=1;//Make sure to mumber off continuously
while (monk[i])
i++;//Make sure that the monk hasn't got a steamed bun yet
if (++count%5==0)
{
monk[i]=1;//Get a steamed bun
steabun++;
}
}
for(i=1;monk[i];i++) ;//Do you know why ";" exists?
printf("The position number of Zhishen Lu is %d.\n",i);
return 0;
}
Does it seem better?Compile and run it,please.
Screen shows the same as that of the previous version!
Amazed?Lost?Cogitate!
The if-else statement does make sure the range of i from 1 to 100,but the "while" statement doesn't.Have you found it?
Yes,when i equals 99,through if-else statement,i becomes 100,but when monk[100] doesn't equal 0,"i++;" statement in the loop will be run.Are you familiar with this process?Right,it's not different from the 2nd version in substance.
Therefore,how can we deal with it on earth?Wait for my next version,please.
Monday, November 2, 2015
Funny C Program:Zhishen Lu Eating Steamed Bun v2
Dear friends,have you found the mistakes in Zhishen Lu Eating Steamed Bun v1?To tell you the truth,I didn't discovery them through observing by myself.What's worth,the grammar is right but the result is wrong,which means there are logical mistakes hard to find.
Then I consulted a condisciple,with whose help I realized that when the value of monk[i] equals 1,which means that monk has got a steamed bun,the loop will terminate immediately,while not what l expect,continuing next circle.After thinking deeply,Zhishen Lu Eating Steamed Bun v2 came out.
//Zhishen Lu Eating Steamed Bun v2
#include <stdio.h>
int main(void)
{
int monk[101]={0},count=0,steabun=0,i=1;//Easy to count.monk[1]~monk[100] for the flower monk Zhishen Lu and other 99 monks,value 0 means they will participate in numbering off.count to number off,steabun for the number of steamed buns already divided and i as a simple counter.
while (steabun<99)
{
while (monk[i])
i++;//Make sure that the monk hasn't got a steamed bun yet
if (++count%5==0)
{
monk[i]=1;//Get a steamed bun
steabun++;
}
if (i==100)
i=1;//Next circle
}
for(i=1;monk[i];i++) ;//Do you know why ";" exists?
printf("The position number of Zhishen Lu is %d.\n",i);
return 0;
}
What's the result?"The position number of Zhishen Lu is 157."
……
It's Okay.I can bear it,since I experienced the failure of the first version.
What exactly is that problem?I'd like to leave it for all of you readers to think about.Thanks for your consistent attentions.
Then I consulted a condisciple,with whose help I realized that when the value of monk[i] equals 1,which means that monk has got a steamed bun,the loop will terminate immediately,while not what l expect,continuing next circle.After thinking deeply,Zhishen Lu Eating Steamed Bun v2 came out.
//Zhishen Lu Eating Steamed Bun v2
#include <stdio.h>
int main(void)
{
int monk[101]={0},count=0,steabun=0,i=1;//Easy to count.monk[1]~monk[100] for the flower monk Zhishen Lu and other 99 monks,value 0 means they will participate in numbering off.count to number off,steabun for the number of steamed buns already divided and i as a simple counter.
while (steabun<99)
{
while (monk[i])
i++;//Make sure that the monk hasn't got a steamed bun yet
if (++count%5==0)
{
monk[i]=1;//Get a steamed bun
steabun++;
}
if (i==100)
i=1;//Next circle
}
for(i=1;monk[i];i++) ;//Do you know why ";" exists?
printf("The position number of Zhishen Lu is %d.\n",i);
return 0;
}
What's the result?"The position number of Zhishen Lu is 157."
……
It's Okay.I can bear it,since I experienced the failure of the first version.
What exactly is that problem?I'd like to leave it for all of you readers to think about.Thanks for your consistent attentions.
Sunday, November 1, 2015
Funny C Program:Zhishen Lu Eating Steamed Bun v1
Zhishen Lu,who is called "flower monk",is one of the 108 heroes in All Men Are Brothers,which is one of the Four Great Classical Novels of Chinese literature.It's said that he went to the daxiangguo temple in Prefecture of Kaifeng at a noon in a hurry to bum lunch.But there were only 99 steamed buns for 99 monks in the temple exactly.So what happened later?
The elder Zhiqing didn't want to offend Zhishen Lu,so he figured out a good idea.
Firstly,he arranged Zhishen Lu at a specific position.
Then,the elder said to all the people,"let's form a ring to number off beginning from me.The 5th men can get a steamed bun and leave."Other people continued to number off from 1 to 5,of course.
Finally,all men but Zhishen Lu ate a steamed bun.What a surprise!
Here comes the problem,"how did it happen?Or,where are Zhishen Lu?"
Smart friends,can you find the position number of Zhishen Lu?
As a matter of fact,I knew this story from a mooc teaching C programming.And I was prompted to use sieve method.Although prompted,I spent one day to find the correct answer.Too long,right?What's worse,I still have some doubts after knowing the answer.It appeared terrible,however,I learned a lot.
Now share my first version of the source code.
//Zhishen Lu Eating Steamed Bun v1
#include <stdio.h>
int main(void)
{
int monk[101]={0},count=0,steabun=0,i=0;//Easy to count.monk[1]~monk[100] for the flower monk Zhishen Lu and other 99 monks,value 0 means they will participate in numbering off.count to number off,steabun for the number of steamed buns already divided and i as a simple counter.
while (steabun<99&&!monk[++i])
{
if (++count%5==0)
{
monk[i]=1;//Get a steamed bun
steabun++;
}
if (i==100)
i=0;//Next circle
}
for(i=1;monk[i];i++) ;//Do you know why ";" exists?
printf("The position number of Zhishen Lu is %d.\n",i);
return 0;
}
Through looking at it,do you find any problems.If not,debug or run it in person.
As a matter of fact,when I finnished this code,I was ecstatic,with great achievability of solving this problem.But quickly,I felt disappointed looking at the result printed on the screen,"The position number of Zhishen Lu is 1. "
Of course,it's wrong,for the elder was at the 1st position.How to correct?I was frustrated.Want to know more?Follow my posts next several days.
In addition,I wrote,compile,and run the code on C4droid on my Android phone,and my blogs are posted through the mobile phone,too.As the operations on the Android phone are limited,such as no debugger on it,so you can barely see pictures in my blogs,and the code was not highlighted.I'm sorry and embarrassed for my economic condition not to buy a computer.But I'm still glad to share.I hope you can gain something through reading my blogs.Thanks.
The elder Zhiqing didn't want to offend Zhishen Lu,so he figured out a good idea.
Firstly,he arranged Zhishen Lu at a specific position.
Then,the elder said to all the people,"let's form a ring to number off beginning from me.The 5th men can get a steamed bun and leave."Other people continued to number off from 1 to 5,of course.
Finally,all men but Zhishen Lu ate a steamed bun.What a surprise!
Here comes the problem,"how did it happen?Or,where are Zhishen Lu?"
Smart friends,can you find the position number of Zhishen Lu?
As a matter of fact,I knew this story from a mooc teaching C programming.And I was prompted to use sieve method.Although prompted,I spent one day to find the correct answer.Too long,right?What's worse,I still have some doubts after knowing the answer.It appeared terrible,however,I learned a lot.
Now share my first version of the source code.
//Zhishen Lu Eating Steamed Bun v1
#include <stdio.h>
int main(void)
{
int monk[101]={0},count=0,steabun=0,i=0;//Easy to count.monk[1]~monk[100] for the flower monk Zhishen Lu and other 99 monks,value 0 means they will participate in numbering off.count to number off,steabun for the number of steamed buns already divided and i as a simple counter.
while (steabun<99&&!monk[++i])
{
if (++count%5==0)
{
monk[i]=1;//Get a steamed bun
steabun++;
}
if (i==100)
i=0;//Next circle
}
for(i=1;monk[i];i++) ;//Do you know why ";" exists?
printf("The position number of Zhishen Lu is %d.\n",i);
return 0;
}
Through looking at it,do you find any problems.If not,debug or run it in person.
As a matter of fact,when I finnished this code,I was ecstatic,with great achievability of solving this problem.But quickly,I felt disappointed looking at the result printed on the screen,"The position number of Zhishen Lu is 1. "
Of course,it's wrong,for the elder was at the 1st position.How to correct?I was frustrated.Want to know more?Follow my posts next several days.
In addition,I wrote,compile,and run the code on C4droid on my Android phone,and my blogs are posted through the mobile phone,too.As the operations on the Android phone are limited,such as no debugger on it,so you can barely see pictures in my blogs,and the code was not highlighted.I'm sorry and embarrassed for my economic condition not to buy a computer.But I'm still glad to share.I hope you can gain something through reading my blogs.Thanks.
Saturday, October 31, 2015
What Do You Think About The Universal Two-Child Policy In China?
Several days ago,Communist Party of China Central Committee stated that the universal two-child policy would be implementated from then on,which means China further relaxed its family planning policy,whose history are more than 30years.
Maybe you thought the family planning policy beyond understanding.Then what do you think about the new policy?
Although it seemed unimaginable for the government to prevent families giving births to more children,it's under special backgroun,or the population of China today would be more unimaginable.On the other hand,to relax the family planning policy was a tendency,of course.
Are you afraid of population increasing of China since the universal two-child policy?Acturally,the era is chaging,and concepts of people are changing,too.The costs to bring up a child are becoming more and more,especially in urban areas.And there are also some other factors that impact the concepts of people.So it's time to carry out the universal two-child policy in China.
What's your opinion?Mind sharing with us?
Maybe you thought the family planning policy beyond understanding.Then what do you think about the new policy?
Although it seemed unimaginable for the government to prevent families giving births to more children,it's under special backgroun,or the population of China today would be more unimaginable.On the other hand,to relax the family planning policy was a tendency,of course.
Are you afraid of population increasing of China since the universal two-child policy?Acturally,the era is chaging,and concepts of people are changing,too.The costs to bring up a child are becoming more and more,especially in urban areas.And there are also some other factors that impact the concepts of people.So it's time to carry out the universal two-child policy in China.
What's your opinion?Mind sharing with us?
Thursday, October 29, 2015
Go After Your Interest,and Realize Your Dream
I posted a blog yesterday discussing whether it's worthy to go to university.And I did also say that I won't stop schooling.But it's really hard for me to learn my major related to biology,which was transferred by my school.
The biggest problem comes from low interest.In fact,I am good at logical thinking while not memorizing,so the scores of some of my courses such as higher mathematics and linear algebra are very high,but those of professional courses are relatively low.As a result,I have started to learn programming and software development by myself.I think it's interesting to make the computer work as you want.
I will go after my interest and keep trying to realize my dream to be a programmer.And what about you?
If you are a programmer,I need your advice,of course.Thank you!
The biggest problem comes from low interest.In fact,I am good at logical thinking while not memorizing,so the scores of some of my courses such as higher mathematics and linear algebra are very high,but those of professional courses are relatively low.As a result,I have started to learn programming and software development by myself.I think it's interesting to make the computer work as you want.
I will go after my interest and keep trying to realize my dream to be a programmer.And what about you?
If you are a programmer,I need your advice,of course.Thank you!
Wednesday, October 28, 2015
Go to University:Worthy or Not?
The author is a university student,but I'd like to announce that posting this blog does not mean the idea to discontinue my schooling.Ha-ha!
The inspiration of this blog came from an article I read several days ago,Americans Also Ask:Whether It Is Worthful to Pay for University,a Chinese version of John Cassidy's article published on The New Yorker on September 7th.Following are my own opinions.
On one hand,education is very wonderful and there are many world-famous universities in America,which is considered the superpower.Should studying in those universities be full of happiness?What's more,learning what we didn't know before,regardless of which universities we are in,can improve our quality undoubtedly.As to the costs,will Americans be worried about this problem?"There’s no doubt that college graduates earn more money, on average, than people who don’t have a degree."Why not go to university?
On the other hand,through this article,I know that Americans who didn't go to university can also earn lots of money(compared to that of developing countries).It seems that whether go to university or not doesn't impact one's living significantly and it's not necessary to pay for university.
In America,it's optional.However,in some other countries,education background is essential when looking for a job,so universities increase enrollment constantly and higher education becomes more and more common.As a result,the amount of graduates increases sharply,the employment pressure is higher,too.
Effective solutions need to be proposed.
On one hand,education is very wonderful and there are many world-famous universities in America,which is considered the superpower.Should studying in those universities be full of happiness?What's more,learning what we didn't know before,regardless of which universities we are in,can improve our quality undoubtedly.As to the costs,will Americans be worried about this problem?"There’s no doubt that college graduates earn more money, on average, than people who don’t have a degree."Why not go to university?
On the other hand,through this article,I know that Americans who didn't go to university can also earn lots of money(compared to that of developing countries).It seems that whether go to university or not doesn't impact one's living significantly and it's not necessary to pay for university.
In America,it's optional.However,in some other countries,education background is essential when looking for a job,so universities increase enrollment constantly and higher education becomes more and more common.As a result,the amount of graduates increases sharply,the employment pressure is higher,too.
Effective solutions need to be proposed.
Tuesday, October 27, 2015
Sharp Contrast:Rethinking of Scientific Research Evaluation
As is known to all,the winners list of 2015 Nobel Prize was published about 3weeks ago.From then on,media has reported what related to Nobel Prize one after another.
One of the concentrations this year is that Chinese scientist Youyou Tu was awarded half of the 2015 Nobel Prize in Physiology or Medicine,with another half shared by William C. Campbell and Satoshi Ōmura.It was the first Nobel Prize Chinese gained in the field of natural science,which makes all Chinese proud.As for Youyou Tu's great contributions for the discoveries concerning a novel therapy against Malaria Diseases,you may have known,so I won't highlight them in particular.However,what I want to say is that Youyou Tu is considered a "three no" scientist in China,no doctor's degree,no overseas education background and no Chinese academician honor.What's your opinion about this?
In contrast,Shangda Fan,an academician of Chinese Academy of Engineering,who has been awarded with the first prize of National Science and Technology Progress Award,meets retractions because of academic cheating.You can search on the Internet for more details,which I'd not like to show.
Through the sharp contrast of these two people's "rank",what do you think about the research evaluation mechanism in China or even all over the world?How should the stadards be reformed?Let's rethink of it.If glad,share your opinions.Thank you!
Through the sharp contrast of these two people's "rank",what do you think about the research evaluation mechanism in China or even all over the world?How should the stadards be reformed?Let's rethink of it.If glad,share your opinions.Thank you!
Monday, October 26, 2015
Blog Means to Share
Since beginning on Blogger,I'll share something regularly,which should be unique and valuable.As a matter of fact,The entire Internet environment is based on sharing.If we want to do better than others in order to keep our blogs or websites remaining,we need to increase the quality of what we share.However,it may be an unrealistc goal for a beginner.
Considering the potential problems,I will share something that seems simple,such as what I see and what I think,with all of you.I hope you can give me some suggestions to encourage me,and I wish to make friends with you if you are willing.
Well,I need to insist on blogging.Good luck!
Subscribe to:
Posts (Atom)