All pastes #964065 Raw Edit

Someone

public text v1 · immutable
#964065 ·published 2008-03-31 00:30 UTC
rendered paste body
void descdend_order(struct employee descend[]){
	int left, right;
	struct employee temp;
	
	for ( left = 0; left < 4; ++left )	//nested for loop for arrays once the right arrays loop is done the left will advance one untill all arrays are checked
		for ( right = left + 1; right < 5; ++right)
			if ( descend[rleft].net_salary < descend[right].net_salary ) //if the left data is larger then right data, then it will execute the following
			{
				temp = descend[left].net_salary;	// temp is set to the left integer
				descend[left].net_salary = descend[right].net_salary;	//the left data is swaped with the right data
				descend[right].net_salary = temp;	//the right data is now set to the temp value
			}
			
			
}