Update cv2/program.c
This commit is contained in:
		
							parent
							
								
									c3301fb347
								
							
						
					
					
						commit
						778648d302
					
				@ -1,7 +1,7 @@
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include <stdbool.h>
 | 
			
		||||
/// @. @
 | 
			
		||||
/// @. @ @
 | 
			
		||||
#define LINE_SIZE 100
 | 
			
		||||
#define LIST_SIZE 200
 | 
			
		||||
 | 
			
		||||
@ -58,7 +58,7 @@ void sort_pizza_list(struct pizza* list, int n)
 | 
			
		||||
        sorted=true;
 | 
			
		||||
        for(int i=0; i<n-1-k; i++)
 | 
			
		||||
        {
 | 
			
		||||
            if(compare_pizza(list[i], list[i+1])<0)
 | 
			
		||||
            if(compare_pizza(list[i], list[i+1])>0)
 | 
			
		||||
            {
 | 
			
		||||
                tmp=list[i];
 | 
			
		||||
                list[i]=list[i+1];
 | 
			
		||||
@ -83,7 +83,7 @@ int main()
 | 
			
		||||
    sort_pizza_list(&list,n);
 | 
			
		||||
 | 
			
		||||
    for(int k=0; k<n; k++)
 | 
			
		||||
       printf("%s%.2f\n",list[k].name, list[k].prize);
 | 
			
		||||
       printf("%s%.6f\n",list[k].name, list[k].prize);
 | 
			
		||||
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user