The pseudo-code of this topic starts with A=2 and B=3. After passing the first if, a
The running code written in java is as follows:
int A=2,B = 3;
int T;
If (A & ltB) {
t = A;
a = B;
b = T;
}
System. Out.println (the value of "a" is "+A+" and the value of b is "+b");
The running results are as follows:
Extended data:
Introduction to common sorting methods:
(1) insert sort-the basic idea of direct insert sort;
Insert a record into the sorted ordered table and get a new ordered table with the number of records increased by 1. That is, the 1 record of the sequence is regarded as an ordered subsequence, and then the second record is inserted one by one until the whole sequence is orderly.
(2) Insert sorting-the basic idea of ——shell sorting:
Firstly, the whole sequence of records to be sorted is divided into several subsequences for direct insertion sorting. When the records in the whole sequence are "basically ordered", all records are directly inserted and sorted in turn.