1 编写函数:计算n的阶乘
% fact.m
function output = fact(n)
% FACT Calculate factorial of a given positive integer.
output = 1;
for i = 1:n
output = output*i;
end
作者文章归档:王半仙
% fact.m
function output = fact(n)
% FACT Calculate factorial of a given positive integer.
output = 1;
for i = 1:n
output = output*i;
end
本文成稿于 2021 年,内容可能存在过期,仅供参考~
下载安装VScode和微信开发者工具
下载按照node.js 路径:D:\software\nodejs
npm(node package manager):nodejs 的包管理器,用于 node 插件管理(安装/卸载/管理依赖等)
cnpm:国内版的 npm(避免网络波动问题),每 10 分钟同步一次完整 npmjs. Org 镜像