Question
Write a proper C program that will keep appending a set of 5 numbers to a file (numbers.dat) based on the number user enters as
Write a proper C program that will keep appending a set of 5 numbers to a file (numbers.dat) based on the number user enters as it runs. The program should keep asking the user for a number. If the number is zero, the program should stop.
The set of 5 numbers should be multiples of the entered number.
Example of the program run
Please enter a number (0 to terminate) : 3
Please enter a number (0 to terminate) : 5
Please enter a number (0 to terminate) : 2
Please enter a number (0 to terminate) : 0
Good bye.
The resulting numbers.dat file should contain the following
3 6 9 12 15
5 10 15 20 25
2 4 6 8 10
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started