cstdio/stdio.h 的區別/ gets(s+1)的注意事項

#include<stdio.h>
//#include<cstdio>
using namespace std;
const int maxn=10010;
const int N=10;
//如果是.h  會進行四捨五入
//下面那個直接切斷 
int main(){
	
	double db=3.25;
	
	printf("%.1f",db);

	return 0;
}
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#include<cmath>

using namespace std;
const int maxn=10010;
const int N=10;

int main(){

	char s[maxn];
	
	scanf("%s",s+1);
	
	int n=strlen(s+1);
	
	printf("%d",n);
	
	return 0;
}

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章