摘要: #include <stdio.h>#include <math.h>int main(){ int dig=0;int count=0;int a;int num;scanf("%d",&num); do{ count++; a =num%10; if((count+a)%2==0){ dig=d 阅读全文
posted @ 2018-05-24 21:00 呦呦呦呵呵呵 阅读(100) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>int main(){ int x; int n = 0;//偶数个数 int j = 0;//奇数个数 do { scanf("%d",&x); if( (x > 0) && (x < 100000)) { if (x%2 == 0) n++; else j++; 阅读全文
posted @ 2018-05-24 20:58 呦呦呦呵呵呵 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 此代码用python 3.6写的。2.几版本可能会出错age_of_boy =44count =0while count<3: #首先允许用户猜三次 guess_age =int(input('guess age:')) if guess_age ==age_of_boy: print('yes,y 阅读全文
posted @ 2018-05-15 21:33 呦呦呦呵呵呵 阅读(298) 评论(0) 推荐(0) 编辑
摘要: 本人用python3.6写的,2.几的版本可能会运行出错输入密码隐藏显示及判断import getpass #调用getpassusername =input('uarname:') password =getpass.getpass('password:')print(username,passw 阅读全文
posted @ 2018-05-15 20:20 呦呦呦呵呵呵 阅读(5358) 评论(0) 推荐(1) 编辑
摘要: 此代码本人用 python3.6 写的格式化输出name= input('name:')age =int(input('age:'))job =input('job:')salary =input('salary:') #输入姓名、年龄、工作、薪水#格式化输出的几种方式1.info = ''' in 阅读全文
posted @ 2018-05-15 20:15 呦呦呦呵呵呵 阅读(179) 评论(0) 推荐(0) 编辑