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;
}
发布了138 篇原创文章 · 获赞 18 · 访问量 7054

猜你喜欢

转载自blog.csdn.net/qq_924485343/article/details/104294912