0
点赞
收藏
分享

微信扫一扫

今天又就纠正一个知识点

女侠展昭 2022-05-03 阅读 22
c语言
#include<stdio.h.>
int main()
{
	int n,s=0;
	scanf("%d",&n);
	while(n!=0)
	{
		 
		s=s*10+n%10;
		n=n/10;//  “/”除法运算符,输入结果为整形,运算结果为整形,舍去两位小数,如果运算量中有一个为实型,则运算结果为双精度实型 
	}
	printf("%d\n",s);
	
	
	return 0;
}
举报

相关推荐

0 条评论