Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: [°ÝÃD]¦p¦óC»y¨¥§âºâ¦¡ªº¼Æ¦r¸ò²Å¸¹¤À¶}?

0 views
Skip to first unread message

jpchern

unread,
Jun 3, 2004, 11:08:27 PM6/3/04
to
※ 引述《guanch...@bbs.sayya.org (Aery)》之銘言:
> 轉信站: KimoWebBBS!netnews.kimo.com.tw!news.csie.ncu!news.ice.cycu!News.Math.NC
> Origin: kenduest.math.nctu.edu.tw
> 像是一個1+2*3/5/(2-3)
> 怎麼把數字跟+-*/()分開
> 我試過
> scanf("%d%c%d%", &num[0], &opt, &num[1]);
> 這樣可以不過~~~好像是笨方法~"~
> 而且只能用少數個
> 有沒有別的方法呢???
> thx

一個個character讀進來, 用ASCII判斷

--
[1;33m※ Origin: [36m奇摩 大摩域 [37m<http://bbs.kimo.com.tw/> [m
[1;35m◆ From: 24.62.69.150

0 new messages