#include <iostream>
using namespace std;
int main() {
int x = 3, y = 5, z = 7;
cout << x++ * ++y + --z * x-- / ++y;
return 0;
}
#include <iostream>
using namespace std;
int func(int n) {
if (n == 0)
return 1;
return n * func(n - 1);
}
int main() {
cout << func(4);
return 0;
}
#include <stdio.h>
float MyFunction(int number) {
int result = 1;
for (int a = 0; a++ < number; a += 8) {
result = result * (a < 5 ? 3 : 2.5);
}
return result;
}
int main() {
int number=33;
float result = MyFunction(number);
printf("The result is: %.2f\n", result);
return 0;
}
The following information relates to a company’s aggregate production planning activities:
Quarter
|
Demand Forecast
|
1
|
37,500
|
2
|
45,000
|
3
|
25,000
|
4
|
62,500
|
Beginning Workforce = 125 workers
Production per Employee = 500 units per quarter
Hiring Cost = $750 per worker
Firing Cost = $1,500 per worker
Inventory Carrying Cost = $10 per unit per quarter
Hol alkalmazunk csapszegeket?