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

2018年4月9日

倒三角c语言
摘要: #include <stdio.h>#include <stdlib.h> int main(){ int n,c,a,b; scanf("%d",&n); for(c=n;c>=1;c--) { for(a=0;a<n-c;a++) printf(" "); for( b=2*c-1;b>=1;b 阅读全文
posted @ 2018-04-09 12:12 ZhangManlun 阅读(1174) 评论(0) 推荐(0)
 
c++文件流
摘要: 比cin快很多 #include <iostream>#include<fstream>using namespace std;ifstream fin("aplusb.in");ofstream fout("aplusb.out"); int main(){ int a,b; while(fin> 阅读全文
posted @ 2018-04-09 11:47 ZhangManlun 阅读(152) 评论(0) 推荐(0)
 
重定向与fopen
摘要: //重定向 #include<stdio.h>#define LOCAL#define INF 1000000000int main(){ #ifdef LOCAL freopen("data.in","r",stdin); freopen("data.out","w",stdout); #endi 阅读全文
posted @ 2018-04-09 11:34 ZhangManlun 阅读(436) 评论(0) 推荐(0)
 
阶乘加法and时间
摘要: #include<stdio.h>#include<math.h>#include<time.h>int main(){ const int MOD =1000000; int i,j,n,s=0; scanf("%d",&n); for(i=1;i<=n;i++) { int factorial= 阅读全文
posted @ 2018-04-09 11:19 ZhangManlun 阅读(194) 评论(0) 推荐(0)
 
c中int范围,int字节长度
摘要: #include<stdio.h>#include<limits.h>int main(){ printf("%i %i %d",INT_MAX,INT_MIN,sizeof(int));} 阅读全文
posted @ 2018-04-09 10:41 ZhangManlun 阅读(2779) 评论(0) 推荐(0)
 
 

公告


博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3