Feeds
提问
Caesar's cypher is the simplest encryption algorithm. It adds a fixed value to the ASCII (unicode) value of each character of a text. In other words, it shifts the characters. Decrypting a text is simply shifting it back by the same amount, that is,
function coded = caesar(a,n) coded1 = []; for ii = 1:size(a,2) if 32<double(a(ii))+n<126 ...
6 years 前 | 0 个回答 | 0
0
个回答提问
Write a function called valid_date that takes three positive integer scalar inputs year, month, day. If these three represent a valid date, return a logical true, otherwise false. The name of the output argument is valid.
unction valid = valid_date(year,month,day) if year < 1 || ~isscalar(year) || year ~= fix(year) valid1 = false;...
6 years 前 | 1 个回答 | 0