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






琼溪

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理

2013年10月1日

例2-3
摘要: #includeint main(void){ /*定义两个整数变量,celsius表示摄氏度,fahr表示华氏度*/ int celsius,fahr; fahr=100; celsius=5*(fahr-32)/9; printf("fahr=%d,celsius=%d\n",fahr,celsius); return 0;} 阅读全文
posted @ 2013-10-01 21:41 琼溪 阅读(116) 评论(0) 推荐(0)
 
例2-2
摘要: #includeint main(void){ printf("Programming is fun.\n"); printf("And programming in C is even more fun!\n"); return 0;} 阅读全文
posted @ 2013-10-01 21:33 琼溪 阅读(115) 评论(0) 推荐(0)
 
例2-1
摘要: #includeint main(void){ printf("Hello World!\n"); return 0;} 阅读全文
posted @ 2013-10-01 21:26 琼溪 阅读(103) 评论(0) 推荐(0)
 
1.1
摘要: #includeint main(void){ int n; int factorial(int n); scanf("%d",&n); printf("%d\n",factorial(n)); return 0;}int factorial(int n){ int i,fact=1; for(i=1;i<=n;i++) fact=fact*i; return fact;} 阅读全文
posted @ 2013-10-01 21:20 琼溪 阅读(137) 评论(0) 推荐(0)