Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Make a program that has the following functions: 1.) program1_apelyido.cpp o Generate 5 random numbers using a loop ranging from 1-20. o Store the set of numbers as an array. o Write only the numbers,...

1 answer below »

FILE HANDLING

PLEASE ANSWER NUMBER 1 ONLY PLEASE.... 

NOTE:

USE C PROGRAMMING LANGUAGE ONLY
PLEASE COPY AND PASTE YOUR CODE
PLEASE SEND THE SCREENSHOT OF THE OUTPUT

Make a program that has the following functions:
1.) program1_apelyido.cpp
o Generate 5 random numbers using a loop ranging from 1-20.
o Store the set of numbers as an array.
o Write only the numbers, each separated by a newline to a file (numbers_apelyido.txt)
o The contents of the file will be replace every time the program is run.
2.) program2_apelyido.cpp
o Retrieve the numbers from the file (numbers_apelyido.txt)
o Print the numbers in the screen console with corresponding remarks if it is an even or
an odd number, each separated by a newline.
o Get the sum and average of the five numbers.
Write the answers in a single line separated by a space to a file (answers_apelyido.txt)
The contents of the file will NOT be replace everytime the program is run.
Extracted text: Make a program that has the following functions: 1.) program1_apelyido.cpp o Generate 5 random numbers using a loop ranging from 1-20. o Store the set of numbers as an array. o Write only the numbers, each separated by a newline to a file (numbers_apelyido.txt) o The contents of the file will be replace every time the program is run. 2.) program2_apelyido.cpp o Retrieve the numbers from the file (numbers_apelyido.txt) o Print the numbers in the screen console with corresponding remarks if it is an even or an odd number, each separated by a newline. o Get the sum and average of the five numbers. Write the answers in a single line separated by a space to a file (answers_apelyido.txt) The contents of the file will NOT be replace everytime the program is run.
Answered 61 days After Jun 07, 2022

Solution

Sairama answered on Aug 07 2022
70 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here