Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I'm at my wits end. Everywhere I look I end up finding nothing. I'm making a program in the Free Pascal IDE that calculates the

I'm at my wits end. Everywhere I look I end up finding nothing.

I'm making a program in the Free Pascal IDE that calculates the mean, medium, and mode of 20 numbers. I managed to make something but it keeps on crashing and giving me erros. Can someone help? ~~~~~~~~~~~~~~~

uses wincrt; type larik=array [1..100] of integer; var a:larik; i,j,n:integer; Procedure input; begin write('Input Data : ');readln(n); for i:=1 to n do readln(a[i]); end; Function mean:real; var x:real; begin x:=0; for i:=1 to n do begin x:=x+a[i]; end; mean:=x/n; end; Function median:real; var b:integer; begin for i:=1 to n-1 do begin b:=0; for j:=n downto i do if a[j]0 then modus:=i; end; end; begin input; mean; median; modus; writeln('Mean : ',mean:3:2); writeln('Median : ',median:2:1); writeln('Modus : ',a[modus]); end.

~~~~~~~~~~~~~~~~~

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Project Management in Practice

Authors: Samuel J. Mantel Jr., Jack R. Meredith, Sco

4th edition

470533013, 978-0470533017

Students also viewed these Databases questions

Question

What does this feeling remind you of?

Answered: 1 week ago

Question

working in capital management includes

Answered: 1 week ago

Question

u = 5 j , v = 6 i Find the angle between the vectors.

Answered: 1 week ago