Advertisement
ChorongBias

Untitled

Jan 17th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. else if (choice == 5)
  2. {
  3. for (z = 0; z < 12; z++)
  4. {
  5. for (j = 0; j < 12; j++)
  6.  
  7. if (Truck[j] < Truck[j + 1])
  8. {
  9. temp = Truck[j];
  10. Truck[j] = Truck[j + 1];
  11. Truck[j + 1] = temp;
  12.  
  13. }
  14. }
  15. printf("The sorted array for Truck in descending order is \n");
  16. for (z = 0; z < 12; z++)
  17. {
  18. printf("%d\n", Truck[z]);
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement