A Data Flow Diagram of a software designer. I write a program based on his algorithm.
Now I found that there were a lot of mistakes in the software designer's test site for printing in, which is really harmful.
I will look at the materials and think about it. If I simply pursue the problem-solving skills, it will not be helpful to my programming skills.
So I wrote some Algorithm Framework questions in C to Improve the efficiency.
Programming efficiency is too bad when you start a mobile app. For example, if you draw a framework chart and then "write" It, You can say "fill" the code.
Therefore, through the test software, I have gone through some software design capabilities that I did not pay attention to before, such as the structure of the document writing program shelf.
It is only necessary to transition from a newbie who will write small programs to an old bird who can write large software.
I want to continue to test the soft configuration to improve my abilities, not just the certificate.
Gossip
For example
A =}
After conversion
B =}
The Code is as follows:
Int main (INT argc, char * argv [])
...{
Int array [10] =... {1, 3, 4, 4, 4, 3 };
Int barray [50];
/**//*
For (INT I = 0; I <10; I ++)
{
Array [I] = rand () % 4;
}
*/
Bool _ C;
If (array [0] = array [1])
...{
_ C = true;
}
Else
...{
_ C = false;
}
Int k1 = 0;
Int K = 1;
Int pot = 1;
Int times = 1;
Barray [1] = array [0];
While (pot <10)
...{
If (array [Pot-1] = array [Pot])
...{
If (_ C)
...{
Times ++;
}
Else
...{
If (times> 1)
...{
Barray [k1] = 1-times;
K1 = K;
K ++;
Barray [k] = array [Pot-1];
}
_ C = true;
Times = 2;
}
}
Else
...{
If (_ C)
...{
Barray [k1] = times;
K1 = k + 1;
Barray [K + 2] = array [Pot];
K = K + 2;
Times = 1;
_ C = false;
}
Else
...{
Times ++;
K ++;
Barray [k] = array [Pot];
}
}
Pot ++;
}
If (_ C)
...{
Barray [k1] = times;
}
Else
...{
Barray [k1] =-times;
}
For (INT Pos = 0; POS <10; POS ++)
...{
Printf ("% d", array [POS]);
}
Printf ("");
Pos = 0;
While (barray [POS]> =-50)
...{
Printf ("% d", barray [POS]);
Pos ++;
}
Return 0;
}