Created
May 18, 2024 02:56
-
-
Save diazvictor/8f171eb0019e1cd3b8be7030c6ce1697 to your computer and use it in GitHub Desktop.
Esté código calcula la probabilidad de duración de una llamada telefónica
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cmath> | |
using namespace std; | |
int main() { | |
// Definición de variables | |
float a = 2.0; // Duración promedio de llamada en minutos | |
float probability; | |
// Ciclo para calcular y mostrar probabilidades | |
for (float t = 1.0; t <= 10; t++) { | |
probability = 1 - exp(-t / a); | |
cout << "Probabilidad de llamada menor a " << t << " minutos: " << probability << endl; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment