# Lab6: I/O and Arrays

E

Lab6 COMP3010

Bc0038– data structure using c von
Bc0038– data structure using chayerpa
502 views6 Folien
Unraveling The Meaning From COVID-19 Dataset Using Python – A Tutorial for be... von
Unraveling The Meaning From COVID-19 Dataset Using Python – A Tutorial for be...Kavika Roy
48 views16 Folien
Vlookup von
111 views1 Folie
C programming session 07 von
C programming session 07Dushmanta Nath
591 views7 Folien
141 views16 Folien
Arrays in c++ von
Arrays in c++Asaye Dilbo
227 views10 Folien

## Was ist angesagt?

Fundamentals of Pointers in C von
Fundamentals of Pointers in CShivanshuVerma11
641 views16 Folien
Excel advanced formulas and functions i-school tutorials von
Excel advanced formulas and functions i-school tutorialstechie_govind
262 views5 Folien
Pointers in c v5 12102017 1 von
Pointers in c v5 12102017 1tanmaymodi4
666 views32 Folien
MS excel - match function von
MS excel - match functionVincent Segondo
572 views14 Folien
User defined data type von
User defined data typeAmit Kapoor
4.7K views10 Folien
Ch13 von
Ch13Arriz San Juan
456 views57 Folien

### Was ist angesagt?(19)

Excel advanced formulas and functions i-school tutorials von techie_govind
Excel advanced formulas and functions i-school tutorials
techie_govind262 views
Pointers in c v5 12102017 1 von tanmaymodi4
Pointers in c v5 12102017 1
tanmaymodi4666 views
User defined data type von Amit Kapoor
User defined data type
Amit Kapoor4.7K views
Doubly linked list von Fahd Allebdi
Fahd Allebdi14.9K views
Spreadsheet formulas ppt (1) von Tammy Carter
Tammy Carter5.2K views
Statistics 141 homework 6 complete solutions correct answers key von Song Love
Statistics 141 homework 6 complete solutions correct answers key
Song Love44 views
Paper talk (presented by Prof. Ludaescher), WORKS workshop, 2010 von Paolo Missier
Paper talk (presented by Prof. Ludaescher), WORKS workshop, 2010
Paolo Missier378 views
Linked list (introduction) 1 von DrSudeshna
DrSudeshna22 views
data structures and algorithms Unit 1 von infanciaj
data structures and algorithms Unit 1
infanciaj19 views
Pointers in C Language von madan reddy
Pointers in C Language

## Similar a Lab6: I/O and Arrays

Input-output von
Input-outputneda marie maramo
1K views38 Folien
You are going to write a program that changes a decimal number into .pdf von
You are going to write a program that changes a decimal number into .pdfarjunhassan8
2 views3 Folien
R-Language-Lab-Manual-lab-1.pdf von
R-Language-Lab-Manual-lab-1.pdfKabilaArun
11 views33 Folien
R-Language-Lab-Manual-lab-1.pdf von
R-Language-Lab-Manual-lab-1.pdfDrGSakthiGovindaraju
50 views33 Folien
R-Language-Lab-Manual-lab-1.pdf von
R-Language-Lab-Manual-lab-1.pdfattalurilalitha
3 views33 Folien
CS10 Python Programming Homework 4 40 points Lists, Tupl.docx von
CS10 Python Programming Homework 4 40 points Lists, Tupl.docxmydrynan
2 views8 Folien

### Similar a Lab6: I/O and Arrays(20)

You are going to write a program that changes a decimal number into .pdf von arjunhassan8
You are going to write a program that changes a decimal number into .pdf
arjunhassan82 views
R-Language-Lab-Manual-lab-1.pdf von KabilaArun
R-Language-Lab-Manual-lab-1.pdf
KabilaArun11 views
CS10 Python Programming Homework 4 40 points Lists, Tupl.docx von mydrynan
CS10 Python Programming Homework 4 40 points Lists, Tupl.docx
mydrynan2 views
COMP 2103X1 Assignment 6Due Thursday, March 2 by 700 PM.docx von donnajames55
COMP 2103X1 Assignment 6Due Thursday, March 2 by 700 PM.docx
donnajames552 views
Mmt 001 von sujatam8
Mmt 001
sujatam8506 views
Use Python This program must use a loop and an accumulation pattern to.docx von StewartyUMGlovern
Use Python This program must use a loop and an accumulation pattern to.docx
[removed]DevelopingTechnical Software As.docx von lanagore871
[removed]DevelopingTechnical Software As.docx
lanagore8713 views
Excel analysis assignment this is an independent assignment me von joney4
Excel analysis assignment this is an independent assignment me
joney451 views
Oop lab assignment 01 von Drjilesh
Oop lab assignment 01
Drjilesh41 views
A01 von lksoo
A01
lksoo368 views
Data Structure.pdf von MemeMiner
Data Structure.pdf
MemeMiner12 views

## Más de enidcruz

Lab7: More Arrays, Strings, Vectors, and Pointers von
Lab7: More Arrays, Strings, Vectors, and Pointersenidcruz
549 views4 Folien
Lab5: Functions 2 von
Lab5: Functions 2enidcruz
339 views3 Folien
Lab4: Functions von
Lab4: Functionsenidcruz
566 views3 Folien
Lab3: More Flow of Control von
Lab3: More Flow of Controlenidcruz
200 views2 Folien
Lab 1: Compiler Toolchain von
Lab 1: Compiler Toolchainenidcruz
194 views4 Folien
My First Source Code von
My First Source Codeenidcruz
171 views1 Folie

### Más de enidcruz(8)

Lab7: More Arrays, Strings, Vectors, and Pointers von enidcruz
Lab7: More Arrays, Strings, Vectors, and Pointers
enidcruz549 views
Lab5: Functions 2 von enidcruz
Lab5: Functions 2
enidcruz339 views
Lab4: Functions von enidcruz
Lab4: Functions
enidcruz566 views
Lab3: More Flow of Control von enidcruz
Lab3: More Flow of Control
enidcruz200 views
Lab 1: Compiler Toolchain von enidcruz
Lab 1: Compiler Toolchain
enidcruz194 views
My First Source Code von enidcruz
My First Source Code
enidcruz171 views
Comp 3010 Syllabus von enidcruz
Comp 3010 Syllabus
enidcruz310 views
Foto-ensayo VIEQUES von enidcruz
Foto-ensayo VIEQUES
enidcruz550 views

## Último

Artificial Intelligence Helps in Drug Designing and Discovery.pptx von
Artificial Intelligence Helps in Drug Designing and Discovery.pptxabhinashsahoo2001
117 views22 Folien
Metatheoretical Panda-Samaneh Borji.pdf von
Metatheoretical Panda-Samaneh Borji.pdfsamanehborji
16 views29 Folien
Class 2 (12 july).pdf von
Class 2 (12 july).pdfclimber9977
9 views1 Folie
1978 NASA News Release Log von
1978 NASA News Release Logpurrterminator
7 views146 Folien
Conventional and non-conventional methods for improvement of cucurbits.pptx von
Conventional and non-conventional methods for improvement of cucurbits.pptxgandhi976
16 views35 Folien
Journal of Geographical Research | Vol.6, Iss.4 October 2023 von
Journal of Geographical Research | Vol.6, Iss.4 October 2023Bilingual Publishing Group
11 views77 Folien

### Último(20)

Artificial Intelligence Helps in Drug Designing and Discovery.pptx von abhinashsahoo2001
Artificial Intelligence Helps in Drug Designing and Discovery.pptx
abhinashsahoo2001117 views
Metatheoretical Panda-Samaneh Borji.pdf von samanehborji
Metatheoretical Panda-Samaneh Borji.pdf
samanehborji16 views
Conventional and non-conventional methods for improvement of cucurbits.pptx von gandhi976
Conventional and non-conventional methods for improvement of cucurbits.pptx
gandhi97616 views
Ethical issues associated with Genetically Modified Crops and Genetically Mod... von PunithKumars6
Ethical issues associated with Genetically Modified Crops and Genetically Mod...
PunithKumars618 views
domestic waste_100013.pptx
Connecting communities to promote FAIR resources: perspectives from an RDA / ... von Allyson Lister
Connecting communities to promote FAIR resources: perspectives from an RDA / ...
Allyson Lister33 views
Guinea Pig as a Model for Translation Research von PervaizDar1
Guinea Pig as a Model for Translation Research
PervaizDar111 views
Workshop LLM Life Sciences ChemAI 231116.pptx von Marco Tibaldi
Workshop LLM Life Sciences ChemAI 231116.pptx
Marco Tibaldi101 views
application of genetic engineering 2.pptx von SankSurezz
application of genetic engineering 2.pptx
SankSurezz6 views
MSC III_Advance Forensic Serology_Final.pptx von Suchita Rawat
Suchita Rawat10 views
Physical Characterization of Moon Impactor WE0913A von Sérgio Sacani
Physical Characterization of Moon Impactor WE0913A
Sérgio Sacani42 views
CSF -SHEEBA.D presentation.pptx
Matthias Beller ChemAI 231116.pptx von Marco Tibaldi
Matthias Beller ChemAI 231116.pptx
Marco Tibaldi88 views

### Lab6: I/O and Arrays

• 1. Assigned: March 26, 2014 1 Due: April 13, 2014 HW 6: I/O and Arrays COMP 3010 Assigned on: March 26, 2014 Due on: April 13, 2014 Problem 1 (a) Compute the median of data ﬁle. The median is the number that has the same number of data elements greater than the numbers as there are less than the number. For purposes of this problem, you are to assume that the data is sorted (that is, is in increasing order). The median is the middle element of the ﬁle if there are an odd number of elements, or the average of the two middle elements if the ﬁle has an even number of elements. You will need to open the ﬁle, count the members, close the ﬁle and calculate the location of the middle of the ﬁle, open the ﬁle again (recall the “start over” discussion in this chapter], count up to the ﬁle entries you need, and calculate the middle. While testing construct several ﬁles on your own, including one with an even number of data points, increasing, and one with an odd number, also increasing. When you are conﬁdent your program is correct, modify it to read data from a ﬁle called dataMedianQuartiles (b) For a sorted ﬁle, a quartile is one of three numbers: The ﬁrst has one fourth the data values less than or equal to it, one-fourth the data values between the ﬁrst and second numbers, one-fourth the data points between the second and the third, and one-fourth above the third quartile. Find the three quartiles for the data ﬁle you used for part a. Hint: You should recognize that having done part a you have one third of your job done. (You have the second quartile already.) You also should recognize that you have done almost all the work toward ﬁnding the other two quartiles as well. Problem 2 Write a program that takes its input from a ﬁle of numbers of type double. The program outputs to the screen the average and standard deviation of the numbers in the ﬁle. The ﬁle contains nothing but numbers of type double separated by blanks and/or line breaks. The standard deviation of a list of numbers n1, n2, n3, and so forth is deﬁned as the square root of the average of the following numbers: (n1 − a)2 , (n2 − a)2 , (n3 − a)2 and so forth The number a is the average of the numbers n1, n2, n3, and so forth. Your program should read input from a ﬁle called stdDev. Hint: Write your program so that it ﬁrst reads the entire ﬁle and computes the average of all the numbers, and then closes the ﬁle, then reopens the ﬁle and computes the standard deviation.