jcyumeng
2017-11-17 09:33max=(a>b)?a:b;用法困惑
我想用max=(a>b)?a:b; 操作符实现变量count从0自增到500,再从500自减到0循环下去,程序哪里出现问题了为什么输出总是6487628
#include<stdio.h>
main()
{
int count=0;
while(count<=500)
{
count=((count++)>(count))?count++:count;
printf("%d\n",&count);
while(count==500)
{
while(count>=0)
{
count=((count--)<(count))?count--:count;
printf("%d\n",&count);
}
}
}
}
- 点赞
- 回答
- 收藏
- 复制链接分享
2条回答
为你推荐
- for(int i :a)报错问题。
- java
- java-ee
- eclipse
- 3个回答
- lChild = new BinNode(e, this);和lChild = new BinNode<T>(e, this);
- lua
- c语言
- Golang
- c++
- 开发语言
- 2个回答
- Golang加密洗牌
- shuffle
- cryptography
- 3个回答
- 如何修复'连接失败:SQLSTATE [42000]:'用于发送表单数据? [重复]
- html
- mysql
- php
- 1个回答
- 求大神帮忙看看max函数错在哪了?
- c语言
- 2个回答
换一换