CSCI-111 Study Guide - Quiz Guide: Array Data Structure, Print Screen

67 views3 pages

Document Summary

Create an array elements with user inputs, find max and min values, calculate average, write in text file with decimal formatting. Created a floating array with size of 5. Finds max and min value of array elements, calculate average of the array floating elements and write them in text file with decimal formatting. Main class code public class main { public static void main(string[] args) throws ioexception { float max; // maximum number of array float min; // minimum number of array float sum =0; // sum of the array elements. Scanner kb = new scanner (system. in); // scanner object to take user input. //int count = 0; // an array elements starting index. // create an float array (named score) with 5 element float[] score = new float[5]; // scanner object to read from read. txt file. // scanner txtread = new scanner (new file ("read. txt")); // printwstream object to write ifrom read. txt file to an array.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers

Related Questions