current position:Home>Single chip microcomputer four digit nixie tube rolling display 0-F

Single chip microcomputer four digit nixie tube rolling display 0-F

2022-02-02 21:10:59 CSDN Q & A

Single chip microcomputer four digit nixie tube rolling display 0-f, Ask the boss for help .




Refer to the answer 1:
#include<stdio.h>#include<stdlib.h>int main(){    int num=0,tn=0;    char str[4] = {
   
   
   
   0};    while (1) {        tn = num;        int a = 0;        while (tn!=0)        {            str[a] = (char)(tn % 2);            tn = tn / 2;            a++;        }        for (int i = 3; i >= 0; i--)        {            printf("%d",str[i]);        }        num = (num + 1) % 15;        printf("\n");    }    return 0;}



Refer to the answer 2:

copyright notice
author[CSDN Q & A],Please bring the original link to reprint, thank you.
https://en.primo.wiki/2022/02/202202022110574091.html

Random recommended