• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • YouClaw
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录

wchenfeng

  • 博客园
  • 联系
  • 订阅
  • 管理

公告

上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 32 下一页

2022年4月12日

编写一个程序实现输入一个英文字母,如果是小写字母将其转换成大写输出,如果是大写字母则直接输出。

摘要: #includeint main(){ char b; scanf("%c",&b); if(b>='A'&&b96&&b<123) printf("%c\n",b-32); return 0;} 阅读全文

posted @ 2022-04-12 20:03 王陈锋 阅读(582) 评论(0) 推荐(0)

编写一个程序计算1-1/2+1/3-1/4+1/5-·······+1/9-1/10,计算其前10项的和。。

摘要: #include#includeint main(){double sum=0.0;int a;int i=1;while(i<11){ a=pow(-1,i+1); sum=sum+(a*(1.0/i)); i++;}pr... 阅读全文

posted @ 2022-04-12 20:03 王陈锋 阅读(228) 评论(0) 推荐(0)

打印直角三角形*

摘要: #includeint main(){ int i,j; for(i=1;i<=6;i++) { for(j=1;j<=i;j++) printf("*"); printf("\n"); }} 阅读全文

posted @ 2022-04-12 20:03 王陈锋 阅读(44) 评论(0) 推荐(0)

c语言基本减法

摘要: #includeint main(){ int a,b; scanf("%d%d",&a,&b); printf("a-b=%d",a-b); return 0;} 阅读全文

posted @ 2022-04-12 20:03 王陈锋 阅读(689) 评论(0) 推荐(0)

c语言中0.f例子

摘要: #includeint main(void){ double a=22222.22222; printf("a=%0.5f\n",a); return 0;} 阅读全文

posted @ 2022-04-12 20:03 王陈锋 阅读(188) 评论(0) 推荐(0)

c语言第一步hello world

摘要: #include int main(void){ printf("hello world"); return 0;} 阅读全文

posted @ 2022-04-12 20:03 王陈锋 阅读(36) 评论(0) 推荐(0)

输入一串数字,输出分开的数字。例如123,输出1 2 3

摘要: #include #include int main(){ int a, i, c, b, t; scanf("%d", &a); t = a; i=0; while (t > 0) { t = t /... 阅读全文

posted @ 2022-04-12 20:03 王陈锋 阅读(163) 评论(0) 推荐(0)

输入一个字符,输出它的ascii

摘要: #include int main() { char ch; scanf("%c",&ch); printf("%d",ch); return 0; } 阅读全文

posted @ 2022-04-12 20:03 王陈锋 阅读(475) 评论(0) 推荐(0)

p173 8-6使用不同方法输出整型数组a的各元素

摘要: #includeint main(){ int a[5]={1,3,5,7,9},i,*p; for(i=0;i<5;i++) printf("%6d\n",a[i]); for(i=0;i<5;i++) printf("%6d\n",*(a+i)); f... 阅读全文

posted @ 2022-04-12 20:03 王陈锋 阅读(28) 评论(0) 推荐(0)

输入大写字母,将大写字母转换为小写字母

摘要: #includeint main(){ char A,B,C; scanf("%c%c%c",&A,&B,&C); printf("%c%c%c\n",A+32,B+32,C+32); return 0;} 阅读全文

posted @ 2022-04-12 20:03 王陈锋 阅读(143) 评论(0) 推荐(0)

上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 32 下一页
 
博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3