C++ program for give equations and error rectifier give program.

Click For Summary
SUMMARY

The discussion presents a C++ program designed to calculate equations related to queuing theory, specifically using parameters such as LAM, MU, and RO. The program utilizes functions for factorial computation and employs mathematical functions from the math.h library. Key outputs include the calculation of EWQ based on the defined parameters, iterating LAM from 0.1 to 1.1. The program also includes a critical error in the factorial function that needs rectification for proper execution.

PREREQUISITES
  • Understanding of C++ programming syntax and structure
  • Familiarity with mathematical concepts in queuing theory
  • Knowledge of the math.h library functions in C++
  • Experience with iterative programming and function definitions in C++
NEXT STEPS
  • Review C++ function definitions and recursion techniques
  • Learn about queuing theory and its applications in performance analysis
  • Explore error handling and debugging techniques in C++
  • Investigate the use of libraries for mathematical computations in C++
USEFUL FOR

C++ developers, students studying queuing theory, and software engineers interested in performance optimization and mathematical modeling.

Anantharaman
Messages
2
Reaction score
0
#include<iostream.h>
#include<math.h>
#include<conio.h>
void main()
{
int n,fact();
float LAM, MU=3, RO, C=0.1, N=10, F1=0, EXX, EWQ;
clrscr();
for (LAM=0.1;LAM<=1.1;LAM=LAM+0.1)
{
RO=LAM/MU;
EXX=2/(MU*MU);
for(n=1;n<N-1;n=n+1)
F1=F1+(N-n)*pow(LAM*C,n-1)*exp(-LAM*C)/fact(n-1);
EWQ=((N-1)/(2*LAM))+((LAM*EXX)/(2*(1-RO)))-F1;
count<<"RAO"<<RO<<"EWq"<<EWQ;
}
getch();
}
int fact()
{
int k;
if(k>1)
{
k=k*fact(k-1);
return(k);
}
else
return(1);
}
 
Technology news on Phys.org
Do you have a question?
 

Similar threads

  • · Replies 22 ·
Replies
22
Views
4K
Replies
47
Views
5K
Replies
12
Views
2K
Replies
14
Views
3K
  • · Replies 19 ·
Replies
19
Views
2K
  • · Replies 6 ·
Replies
6
Views
12K
  • · Replies 8 ·
Replies
8
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
73
Views
6K
  • · Replies 5 ·
Replies
5
Views
3K