#job 25
来源:互联网 发布:黑马手机安全卫士源码 编辑:程序博客网 时间:2024/06/05 02:35
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <math.h>int digit(int n,int k){int i,m,count;count = 1;if(n < 0)n = -n;while (n/(int)pow(10,count)>=1)count++;if(k > count || k < 1)return -1;else{for(i=1;i<k;i++)n=n/10;m=n%10;return m;}}int main(){int n;int k;while(scanf("%d%d",&n,&k)){if(n==0)break;elseprintf("digit(%d,%d) = %d\n",n,k,digit(n,k));}}
0 0
- #job 25
- job
- job
- job
- job
- job
- JOB
- job
- Job
- job
- Job
- job
- JOB
- job
- job
- job
- job
- 【JOB】
- 黑马程序员—【Java高新技术】之内省、注解、类加载器
- 字符串转为整数(阿里一面测试开发岗题目)
- POJ 2151 Check the difficulty of problems dp
- Generate PDF from Batch Class and schedule class and send email notification with Pdf attachment
- Java 7 新的 try-with-resources 语句,自动资源释放
- #job 25
- Git学习笔记
- 分布式系统系列(一)---EJB
- 【算法导论】 堆排序
- 黑马程序员——File类的概述
- Java网络编程技术
- 利用SharedPreference实现数据存储
- 编程之美2.19—区间重合判断
- 判断一个序列是否是一个二叉查找树的后序遍历结果