Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想要一个命令,让我知道股票收盘价。
我怎样才能做到这一点?
这是一个非常开放式的问题,不是很具体,所以我基本上只是在这里大声思考。Tou 必须编写一个命令行程序,接收股票代码,然后转到某种 Web 服务并获取该代码的适当值。
那么你想要一些只输出到终端窗口的东西(即“标准输出”)吗? >stock AAPL 339.30
>stock AAPL
339.30
stock将是已编译二进制文件的名称。 该程序接受股票代码的单个参数。它将代码发送到提供定价信息的 Web 服务,然后解析结果并将其返回。
stock