Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- main ()
- {
- int x, anzahl;
- double zahl, summe=0.0, mittelw;
- printf("\n\t S T A T I S T I K\n");
- printf("\nWieviele Werte wollen Sie eingeben: ");
- scanf("%i",&anzahl);
- printf("\n");
- for(x=1; x<=anzahl; x=x+1)
- {
- printf("Bitte %i. Zahl eingeben : ",x);
- scanf("%lf",&zahl);
- summe=summe+zahl;
- }
- mittelw=summe/anzahl;
- printf("\n\nSumme der Zahlen = %f", summe);
- printf("\nMittelwert der Zahlen = %f\n", mittelw);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement