printf("\nMean Value Analysis algorithm for single class workload\n"); while (TRUE) { printf("\n(Hit RETURN to exit) "); printf("Enter no. of centers (K): "); gets($input); if ($input == "") { break; } else { $K = atoi($input); } for ($k = 1; $k <= $K; $k++) { printf("Enter demand at center %d (D[%d]): ", $k, $k); gets($input); $D[$k] = atof($input); } printf("Enter think time (Z):"); gets($input); $Z = atof($input); while (TRUE) { printf("\n(Hit RETURN to stop) "); printf("Enter no. of terminals (N): "); gets($input); if ($input == "") { break; } else { $N = atoi($input); mva(); } } } // main
function berekne_vanlig_mva($totalpris) { return $this->berekne - mva($totalpris, 0.25); }