Newsgroups: fj.lang.perl,fj.lang.c
Path: galaxy.trc.rwcp.or.jp!sparky!uunet!decwrl!intertech-nh!utashiro
From: utashiro@InterTech.COM (Kazumasa Utashiro)
Subject: Re: Credit Card Expire
Message-ID: <1992Apr9.190709.629@InterTech.COM>
Followup-To: fj.lang.c
Organization: InterTech Data Systems, Inc., Cupertino, CA
References: <1992Apr6.185936.17336@InterTech.COM> <MAECHAN.92Apr8123729@puffin.crl.mei.co.jp> <274@resgw.research.co.jp>
Date: Thu, 9 Apr 1992 19:07:09 GMT
Lines: 19
Xref: galaxy.trc.rwcp.or.jp fj.lang.perl:54 fj.lang.c:1231
X-originally-archived-at: http://galaxy.rwcp.or.jp/text/cgi-bin/newsarticle2?ng=fj.lang.perl&nb=54&hd=a
X-reformat-date: Mon, 18 Oct 2004 15:18:22 +0900
X-reformat-comment: Tabs were expanded into 4 column tabstops by the Galaxy's archiver. See http://katsu.watanabe.name/ancientfj/galaxy-format.html for more info.

In article <274@resgw.research.co.jp>
mac@resgw.research.co.jp (Shigeru Makino) writes:
>$B$G$b!"(Butsshiro$B$5$s$N$KHf$Y$?;~!"(BC$B$7$+J,$+$i$J$$;d$O!"(B
>$BB?>/!J2?8N$+!K@oXK$r3P$($^$7$?$N$G(B :-)
>$B<:Ni$J$,$i!"(Bhack$B$5$;$F$$$?$@$-$^$7$?!#(B

$B$8$c!"$D$$$G$J$N$G!"$h$$$3$O??;w$7$F$O$$$1$J$$%W%m%0%i%`$N8+K\(B

i, s, l;
main(c, v)
char **v;
{
char *cp = c > 1 ? *++v : (char*)exit(1);
for (s = 0, l = strlen(cp); (i = *cp++ - '0') >= 0; s += i)
if (--l&1 && i <<= 1) i = i/10 + i%10;
printf("%d\n", s);
}

--utsshiro ($B$"!"$$$D$N$^$K$+(B fj.living $B$,$J$/$J$C$F$k!D(B)
