【发布时间】:2023-04-09 16:55:02
【问题描述】:
我不知道为什么输出是ASCII码而不是整数值,我的代码有什么问题?
import 'dart:io';
void main() {
int n = 0;
print("input: ");
do {
n = stdin.readByteSync();
} while (n>1000 || n<0);
if (n % 4 == 0) {
print("output: ");
print(n);
n++;
} else {
print("output: ");
n--;
print(n);
}
}
【问题讨论】:
-
你能代替截图,添加你的代码吗?
标签: console dart output flutter