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 - /* 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;
-
-
}
2 1305
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 - /* 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;
-
-
}
What error is it giving?
I compiled your code with Tubro C V3.0, Boralnd C Builder Visual C and gcc without problems - sounds as though your compiler is broken. Try downloading DEV-C++ from
http://www.bloodshed.net/devcpp.html
it is easy to use and you don't have to create a project when implementing single file programs!
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Martin Bless |
last post by:
I need to access a MSSQL database (MS-Sql, not MySQL!)and would very
much like to use mssql-0.09.tar.gz which is available from
http://www.object-craft.com.au/projects/mssql/download.html
...
|
by: Paul |
last post by:
HI! I have a script here below that I want to use in order to bet around a
small bug in Firefox.
function Firefoxautofix(x,y,){
parent.window.resizeBy(-1,-1)
parent.window.resizeBy(+1,+1)
}
...
|
by: Aaron Queenan |
last post by:
When I build a C++ library to .NET using the managed C++ compiler, I get the
following error message:
Linking...
LINK : error LNK2020: unresolved token (0A000005) _CrtDbgReport
LINK : error...
|
by: Michael A. Covington |
last post by:
Suppose class X has some public properties, and class Y inherits from X. Is
there a way that some of the public properties of X can be private (hidden)
in Y (but still usable by the methods...
|
by: Rudy Ray Moore |
last post by:
Hi guys,
I just upgraded to "Visual Studio .net 2003 7.1 c++" from VS6.
Some things I like (proper for loop variable scoping, for example), but some
other things are troubling me.
One...
|
by: tommaso.gastaldi |
last post by:
Hi friends
I was in the need to find a "definitive" :) solution to transform a
relative path
such as "~/MyDir/MyFile in a full web address. In particular I needed
it within
web services.
I...
|
by: Suman |
last post by:
Happy Friday everyone!!!
I am working on a windows service and a C# application and needed some
help with certain functionality. Please read through my issue below.
Thanks!
I have a windows...
|
by: =?ISO-8859-1?Q?G=E9rard_Talbot?= |
last post by:
Hello Randy and Jim,
I read/glanced through
comp.lang.javascript FAQ - 9.5 - 2007-01-23
and have some corrections and additions to submit.
In section 4.26
---------------
...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| | |