i have made the corrections as u directed but still is not compiling. not reading the header files. i still think the compiler is not complete. what do u think.
i need ur help.what about sending a compiler to {removed (against site rules)}
below is the corrected code
i need ur help.what about sending a compiler to {removed (against site rules)}
below is the corrected code
Code:
/* programe to solve mr jones problem. by odo emeka */ #include <stdio.h> #include <stdlib.h> #include <time.h> int main() { int i, j, nows, fixc, maxdemand, minprice, totmh, price,demand; float ppst, mnh; srand(time(NULL)); printf("Enter Number of workers:"); scanf("%d", &nows); printf("Enter fixed cost:"); scanf("%d", &fixc); if(nows>24) printf("Enter Number less than or equal to 24"); else printf("\n"); for(i=1;i<=10;i++) { price = 1000+rand()%2500; if(price<=price++) minprice=price; else minprice = price++; for(j=1;j<=10;j++) { demand = 3000+rand()%5000; if(demand >= demand++) maxdemand = demand; else maxdemand = demand++; if(maxdemand>=4000) totmh = 48; else totmh = 24; } mnh= totmh/nows; ppst= (fixc+minprice)/maxdemand; printf("\n\n"); printf("Total number of workers in the company\n",nows); printf("The fixed cost of production = \n", fixc); printf("The variable cost = \n", minprice); printf("The max. demand attracted by the above costs = \n", maxdemand); printf("The total men hour involved in the production = \n", totmh); printf("Total hourly input for each workers = \n",mnh); printf("The price that will attract above max. demand = \n", ppst); } return 0; }
Comment