41 Create New File Dev C Write Program Save Random Numbers File Header Comments Must Prese Q37155280

4.1 Create a new file (in Dev C++)

Write a program to save random numbers to a file:

  • Header comments must be present
  • Use constants for minimum and maximum values
  • Each number should be in the range 1 – 100 (min: 1, max:100)
  • Each row should have 10 – 30 numbers (min: 10, max: 30),separated by a single space
  • The file should have 20 – 40 rows (min: 20, max:40)
  • The file should be named “random_numbers.txt”
  • Use comments and good style practices

Make sure to open the file before writing to it, and close thefile when you are done with it.

Note there is no output to the screen, only

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.