![photo](/responsive_image/150/150/0/0/0/cache/matlabcentral/profiles/10577509_1522136694348_DEF.jpg)
Vaibhav Dwivedi
自 2017 起处于活动状态
Followers: 0 Following: 0
Feeds
提问
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.
My code: function[c]=digit_counter(filename) fid=fopen(filename,'rt'); if fid<0 er...
7 years 前 | 5 个回答 | 0