热门

最新

红包

立Flag

投票

同城

我的

发布
gazeabyss
GazeAbyss
5 年前
truegazeabyss

#include <stdio.h>

void main()

{
int x;
int ones , tens , hunds ;
printf("请输入三个整数:\n");
scanf("%d",&x);
ones = x / 100;
tens = x % 100 / 10;
hunds = x % 100 % 10;
printf("ones=%d,tens=%d,hunds=%d",ones,tens,hunds);

}


这段代码中的ones=x/100;
tens=x%100/10;
hunds=x%100%10;
里面的“/”和“%”分别是什么意思。

CSDN App 扫码分享
分享
评论
3
打赏
  • 复制链接
  • 举报
下一条动态
立即登录