摘要: 题目描述如下: 知识点①:char数组与int型数字进行运算时,需要将 char[i]-'0' 。比如 当输入c[0] = 5时,以%d形式输出c[0] ,输出结果为 53,所以在进行运算是需要减去48。 注意①:在进行简单的数组运算时,一定要保证下标的计算正确,不要出现低级错误。 我的题解(只有8 阅读全文
posted @ 2019-05-17 21:59 EPEP 阅读(292) 评论(0) 推荐(0) 编辑
摘要: #include int main(){ int s = 250; int x, n, distance = 0; scanf("%d %d",&x,&n); while(n--){ // 只要n>0就一直走此循环 if(x<=5) // 如果x(周x)非双休日,则距离增加250 distance += s... 阅读全文
posted @ 2019-05-17 09:43 EPEP 阅读(185) 评论(0) 推荐(0) 编辑