3-3 Product
来源:互联网 发布:监控软件行为 编辑:程序博客网 时间:2024/04/30 03:28
#include <stdio.h>#include <ctype.h>int main(){ char ch; int iNumber=0; long lProduct=1; while((ch=getchar())!=EOF) //Using getchar() { if(isdigit(ch)) //Judge whether the char get from console is digit { iNumber=iNumber*10+ch-'0'; } else if(' '==ch||'\n'==ch) //If the char is not digit,then judge whether it is Space or Enter { lProduct*=iNumber; iNumber=0; //Let iNumber=0,for the next calculation } else //If the char is not digt or Space or Enter,it must be other characters like letter,so let iNumber=1, { //because when we input other characters like letter,then iNumber will become 0, iNumber=1; //and everything will become 0. } } printf("%ld\n",lProduct%1000);}
- 3-3 Product
- Unit 3-Lecture1: Sum & Product
- magento custom product api (3) --- getupdatedproducts
- product
- Product
- Product
- Product
- Product
- 重读《Programming Pearls》之十一:Part 3:The Product
- Struts2.3.16.3 常用标签(1) s:product标签
- 编程练习思考[3]---leetcode--Maximum Product Subarray
- Middle-题目3:238. Product of Array Except Self
- 算法array-3-628. Maximum Product of Three Numbers
- Mathematics for 3D Game Programming and Computer Graphics - Vector Cross Product
- projecteuler网站第四题解法:Find the largest palindrome made from the product of two 3-digit numbers
- Max product
- 2510: Product
- 10106 - Product
- 俞敏洪老师的这段话...... (记住每天早晚看一次)
- Hibernate自动创建表
- 微软,你肿么了
- ubuntu 环境变量
- 在java代码中如何得到n天的时间
- 3-3 Product
- [1306] Divide The Apples 平分重量 平分数字
- spring心得7--spring第二大特点AOP(面向切面)讲解
- UPnP中Control Point的基本流程
- mergesort
- WCHAR和char的转换
- 中高级java软件工程师招聘要求
- spring心得8--AOP各种通知案例讲解.doc
- poj 1192 最优联通子集 简单dp