Skip to content

Pascal-y/Statistique-Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

  1. The program begins by defining the maximum number of modalities that can be entered (MAX_MODALITIES is set to 20).

  2. It includes necessary header files like <stdio.h>, <stdlib.h>, and <math.h> for input/output, memory allocation, and mathematical functions respectively.

  3. Several functions are defined to calculate statistical elements:

    • calculerMoyenne: Calculates the mean of the input modalities.
    • calculerVariance: Calculates the variance of the input modalities.
    • calculerEcartType: Calculates the standard deviation using the variance.
    • calculerMediane: Calculates the median of the input modalities.
    • calculerMode: Calculates the mode of the input modalities.
  4. In the main function:

    • An array modalites is declared to store the input modalities, and variables n and entree are initialized.
    • The program asks the user to enter the modalities using a while loop, stopping when -1 is entered or the maximum number of modalities is reached.
    • After input, the program calculates the mean, variance, standard deviation, median, and mode using the defined functions.
    • Finally, it displays the input modalities, along with the calculated statistical elements.

The program provides a simple interactive way for the user to input statistical data and then computes and displays various statistical measures based on that input.

About

This is my first Project as an NGCodex Learner

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages