如何实现这一步骤(c语言基础不好)
在 8 位数码管上的任意 3 位循环显示标题内容的数字
在 8 位数码管上的任意 3 位循环显示以下数值: 0,14,28,42,56,70,84,98,112,126。
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
1条回答 默认 最新
关注```c #include <stdio.h> int main() { int values[] = {0, 14, 28, 42, 56, 70, 84, 98, 112, 126}; int counter = 0; while (1) { // Display the current value printf("%d\n", values[counter]); // Increment the counter and wrap around if necessary counter = (counter + 1) % 10; } return 0; }```
解决 无用评论 打赏 举报