C++:地平线2019相关题
2021-01-29 17:17
阅读:682
标签:运算符 sig 答案 std space 解释 相关 unsigned printf
目录
- 无符号数和有符号数相加
- 题目
- 答案及解释
无符号数和有符号数相加
题目
#include "stdafx.h"
#include "stdlib.h"
#include
#pragma warning( disable : 4996)
#include
using namespace std;
int main()
{
unsigned int a = 6;
int b = -20;
(a + b > 6) ? puts(">6") : puts("
答案及解释
C++条件运算符:https://www.runoob.com/cplusplus/cpp-conditional-operator.html
输出:>6
解释:
int main()
{
unsigned int a = 6;
int b = -20;
(a + b > 6) ? puts(">6") : puts("
C++:地平线2019相关题
标签:运算符 sig 答案 std space 解释 相关 unsigned printf
原文地址:https://www.cnblogs.com/wt-seu/p/12831399.html
评论
亲,登录后才可以留言!