会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
风再起时,
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
2023年3月21日
Java第一次作业
摘要: 1. 定义圆形半径,求面积。int r =5。 public class ljh { public static void main(String[] args) { // TODO Auto-generated method stub int a=3 ,r=5; int s; s=a*r*r; S
阅读全文
posted @ 2023-03-21 13:47 风再起时,
阅读(30)
评论(0)
推荐(0)
2021年11月27日
第九次作业
摘要: ⦁ 用循环结构求字符串长度 #include <stdio.h> main() { char str[80]; int i=0; int length=80; gets(str); puts(str); while(str[i++]!='\0') length++; printf("字符串的长度为:
阅读全文
posted @ 2021-11-27 23:27 风再起时,
阅读(31)
评论(0)
推荐(0)
2021年11月18日
第八次作业
摘要: 1定义一个含有八个储存单元的实验数组,从键盘上接收数,然后输出。 #include <stdio.h> main() { int i; double a[8]; for(i=0;i<=7;i++) { scanf("%lf",&a[8]); for(i=7;i>=0;i--) printf("%f"
阅读全文
posted @ 2021-11-18 20:56 风再起时,
阅读(30)
评论(0)
推荐(0)
2021年11月14日
第七次作业
摘要: 1. #include<stdio.h> main() { int i,j; for(i=1;i<=5;i++) { for(j=1;j<=9-2*i;j++) printf("*"); printf("\n"); } } 2. #include <stdio.h> main(){ int i,j,
阅读全文
posted @ 2021-11-14 10:33 风再起时,
阅读(28)
评论(0)
推荐(0)
2021年11月5日
第六次作业
摘要: 编写程序,使用while语句求和sum=1+3+5+…+21 #include <stdio.h> main() { int i=1,sum=0; while(i<=21) { sum+=i; i+=2; } printf("sum=%d\n",sum); } 编写程序,使用while语句求和sum
阅读全文
posted @ 2021-11-05 19:41 风再起时,
阅读(21)
评论(0)
推荐(0)
2021年10月31日
第五次作业
摘要: 编写程序判断n是正数还是负数 #include <stdio.h> main(){ int n; scanf("%d",&n); if(n>0){ printf("正数"); } else if(n<0){ printf("负数"); } } 2.使用条件运算符,找出四个数a,b,c,d四个数中最大
阅读全文
posted @ 2021-10-31 14:36 风再起时,
阅读(14)
评论(0)
推荐(0)
2021年10月27日
第四次作业
摘要: 教材P52 例4-8 分数转成等级 switch #include <stdio.h> main(){ int mark; printf("输入学生的分数(0-100):\n"); scanf("%d",&mark); switch(mark/10) { case 10:printf("A\n");
阅读全文
posted @ 2021-10-27 22:09 风再起时,
阅读(23)
评论(0)
推荐(0)
2021年10月19日
第三次作业
摘要: 1.编写程序,判断一个数n是正数还是负数 #include <stdio.h> main(){ float n; scanf("%f",&n); if(n>0) printf("正数!\n"); else if(n==0) printf("0既不是正数也不是负数!\n"); else printf(
阅读全文
posted @ 2021-10-19 10:33 风再起时,
阅读(24)
评论(0)
推荐(0)
2021年10月12日
第二次作业
摘要: 1.编写程序,定义两个整形变量,赋值并输出 #include <stdio.h> main(){ int a=5,b=8; printf("%d %d\n",a,b); } 2.编写程序,定义一个单精度和一个双精度的变量,赋值并输出。 #include <stdio.h> main(){ float
阅读全文
posted @ 2021-10-12 11:41 风再起时,
阅读(203)
评论(0)
推荐(0)
2021年10月1日
第一次作业
摘要: 1.编写程序,输出“我爱学习c语言!” #include<stdio.h> main(){ printf("我爱学习c语言!"); } 2.分行输出自己的专业和姓名 #include<stdio.h> main(){ printf("计算机科学与技术\n"); printf("龙建行\n"); }
阅读全文
posted @ 2021-10-01 16:08 风再起时,
阅读(27)
评论(0)
推荐(0)
上一页
1
2
公告