error c: ....... line 4: unable to open include file 'stdlib.h'
error c: ........line 5: unable to open include file 'time.h'
error c: ........line 12: unidentified symbol 'null' in function intmain
error c:.........line 24: unidentified symbol 'price' in function intmain
error c:.........line 24: invalid indirection in function intmain
error c: .......line 25: statement missing ; in function intmain
error c: .......line 27: misplace else in function intmain
error c:........line 28: invalid indirection in function intmain
warning c: ...line 32: code has no effect in function intmain
error c: ..... line 32: for statement missing ; in function intmain
warning c:...line 45:possible use of 'minprice' before definition in function intmain
warning c:..line 45:possible use of 'maxdemand' before definition in function intmain
warning c:..line 50: possible use of 'minprice' before definition in function intmain
warning c:...line 51:possible use of 'maxdemand' before definition in function intmain
warning c:...line 52:possible use of 'totmh' before definition in function intmain
error c: .......line 53:undefined symbol 'mnh' in function intmain
error c: ........line 56: undefined symbol 'return' in function intmain
warning c:....line 56: code has no effect in function intmain
error c:.......line 56: statement missing ; in function intmain
error c: ......line 59: compound statement missing } in function intmain
error c: ...... line 60: compound statement missing } in function intmain
the above are the list of the errors. the code is as shown below again. please, i need the reply urgently.
thank u very much for the effort so far. hope u will look into my problem critically
Expand|Select|Wrap|Line Numbers
- /* programe to solve mr jones problem. by odo emeka*/
- #include <stdio.h>
- #include <stdlib.h>
- #include <time.h>
- intmain()
- {
- int i, j, nows, fixc, maxdemand, minprice, totmh;
- 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[i] = 1000+(rand()%2500)
- if(price[i]<=price[i++]
- minprice=price[i];
- else
- minprice = price[i++];
- {
- for(j=1,j<=10,j++){
- demand[j] = 3000+(rand()%5000
- if(demand[j] >= demand[j++])
- maxdemand = demand[j];
- else
- maxdemand = demand[j++];
- 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,"hours");
- printf("The price that will attract above max. demand = \n", ppst);
- Return 0;
- }