1. Список говнокодов пользователя tyrin

    Всего: 11

  2. Си / Говнокод #18770

    −1

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    #include<stdio.h>
    	main(void){
    	#define   SIZE 10
    	int workers[SIZE] = {0,0,0,0,0,0,0,0,0};
           int frequency[SIZE] = {0,0,0,0,0,0,0,0,0};          		
    	int freq[SIZE]  = {0,0,0,0,0,0,0,0,0};
    	int salary = 200;	
    	int  m = 0, k = 0 ,n = 0, x = 0;
    
    for( k = 1 ; 	k <= SIZE - 1  ; ++k){
       printf("inter summary cash = ");
           scanf("\n%d", &m);
    	  workers[k] = m;
    	  freq[k ]	= (int) salary +  ( workers[k] * 0.01 ) * 9;
    		printf("number index%4d  up salary $%d\n", k  , freq[k]);
    		puts("");
    	}
    
    for(n = 1;n <= SIZE  - 1; n++){
      freq[x]	=  salary +  (workers[n] * 0.01 ) * 9   ;
        if(freq[n] >= 200 && freq[n] < 1000 ){
           ++frequency[(int)  freq[n] / 100  ]  ;
    	 }
    else if ( freq[n] > 1000 ){
    	++frequency[10];
    		 }
    	}		
    		
          for(x = 2;  x <=  SIZE ; x++ ){							
    	printf("$%4d = $%4d 	%d\n",salary, salary + 99,	frequency[x]  );						
                  salary += 100;		
    		}	
    return 0;
    	}

    Задачу по Дейтелам решал.

    tyrin, 27 Сентября 2015

    Комментарии (1)