with ada.text_io; with ada.integer_text_io; procedure homework1 inputFileName : String (1..80); outputFileName: String (1..80); blankString : CONSTANT String (1..80):= (OTHERS => ' '); inputFile : ada.text_io.file_type; outputFile : ada.text_io.file_type; begin -- initialize the input filename to all blanks - discussed several ways to do this inputFileName := blankString; --1. prompt for input filename -- get user's input filename ada.text_io.get (inputFileName); -- open the user's input file ada.text_io.open ( file => inputFile, mode => ada.text_io.in_file, name => inputFileName); -- initialize the output filename to all blanks --2. prompt for output filename -- create output file ada.text_io.create( file => mode => name => ); -- read the five integers from the file ada.integer_text_io.get ( file => inputFile, item => -- put in the name of the desired variable ); -- echo the five integers to the output file (and the screen) ada.integer_text_io.put ( item => -- put in variable name here ) ada.integer_text_io.put ( file => item => ); -- square the five integers -- write the five squares to the output file -- close the input file ada.text_io.close ( file => ); -- close the output file -- tell the user where the input came from -- tell the user where the output is stored -- tell the user the program has ended normally end homework1;