摘要: 1.编写一个简单程序,要求数组长度为5,静态赋值10,20,30,40,50,在控制台输出该数组的值 import java.util.Random; import java.util.Scanner; public class zy { public static void main(String 阅读全文
posted @ 2023-04-18 22:48 微笑|哈哈 阅读(19) 评论(0) 推荐(0)
摘要: 1.使用for循环计算1-100的和,除了以3结尾的那些数 import java.util.Random; import java.util.Scanner; public class zy { public static void main(String[] args) { // TODO Au 阅读全文
posted @ 2023-04-12 00:25 微笑|哈哈 阅读(19) 评论(0) 推荐(0)
摘要: 1.分别使用for循环,while循环,do循环求1到100之间所有能被3整除的整数的和。(知识点:循环语句) import java.util.Random; import java.util.Scanner; public class zy { public static void main(S 阅读全文
posted @ 2023-04-05 21:32 微笑|哈哈 阅读(12) 评论(0) 推荐(0)
摘要: 1 输入年份月份,输出该月的天数(闰年2月29天,条件参考上机练习1) package 第四周上机; import java.util.Scanner; public class zy { public static void main(String[] args) { // TODO Auto-g 阅读全文
posted @ 2023-03-30 23:01 微笑|哈哈 阅读(21) 评论(0) 推荐(0)
摘要: 1 定义圆形半径,求面积。 import java.util.Scanner; public class zy { public static void main(String[] args) { // TODO Auto-generated method stub Double r=6.23; D 阅读全文
posted @ 2023-03-30 22:46 微笑|哈哈 阅读(20) 评论(0) 推荐(0)
摘要: 1.定义圆形半径,求面积。 package ccc; import java.util.Scanner; public class ccc { public static void main(String[] args) { // TODO Auto-generated method stub Sc 阅读全文
posted @ 2023-03-21 13:52 微笑|哈哈 阅读(18) 评论(0) 推荐(0)
摘要: #include<stdio.h> main() { char str[20]; int i,cnt; cnt=i=0; gets(str); while(str[i]!='\0') { if(str[i]>='A'&&str[i]<='Z') cnt++; i++; } printf("大写字母个 阅读全文
posted @ 2021-11-24 23:11 微笑|哈哈 阅读(31) 评论(0) 推荐(0)
摘要: #include<stdio.h> main() { double m[8]; int i; for(i=0;i<=7;i++) scanf("%lf",&m[i]); for(i=7;i>=0;i--) printf("%f",m[i]); } #include<stdio.h> main() { 阅读全文
posted @ 2021-11-24 23:10 微笑|哈哈 阅读(32) 评论(0) 推荐(0)
摘要: #include<stdio.h> #include<stdlib.h> #include<time.h> int main() { int a,n; srand((unsigned)time(NULL)); a=rand()%100; printf("%d\n",a); while(1){ sca 阅读全文
posted @ 2021-11-24 23:08 微笑|哈哈 阅读(30) 评论(0) 推荐(0)
摘要: #include<stdio.h> main() { char str[20]; int i,cnt; cnt= i=0; gets(str); while(str[i]!='\0') { if(str[i]>='A'&&str[i]<='Z') cnt++; i++; } printf("大写字母 阅读全文
posted @ 2021-11-24 23:06 微笑|哈哈 阅读(33) 评论(0) 推荐(0)