Clear Filters
Clear Filters

Info

This question is closed. Reopen it to edit or answer.

Write a function called digit_counter

1 view (last 30 days)
RUTARAKA GIDEON
RUTARAKA GIDEON on 4 Mar 2018
Closed: Walter Roberson on 4 Mar 2018
Write a function called digit_counter that takes the name of a text file as input and returns the number of digits (i.e., any of the characters, 0-to-9) that the file contains. If there is a problem opening the file, the function returns -1. WARNING: if you use the ‘w’ flag with fopen, as opposed to ‘r’, you will overwrite the file. The grader uses your own m files to check your function, so be careful!

Answers (0)

This question is closed.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!