以下程序(程序还未写完)中 first= 是为了记录数码管显示的值,但是我数码管的值是用Nixie()函数实现的,所以我不知道first该怎么用abc的值表示出来?
#include <STC89C5xRC.H>
#include "Delay.h"
#include "Nixie.h"
void main()
{
unsigned int a=0;
unsigned int b=0;
unsigned int c=0;
unsigned int anjian=0;
unsigned int first=;
unsigned int zhan,second;
unsigned int jia,jian,cheng,chu;
while(1)
{
Nixie(1,a);
Nixie(2,b);
Nixie(3,c);
if(P31==0)
{
Delay(20);
if(P31==0)
{
Delay(20);
while(!P31);
Delay(20);
a++;
if(a>=10)
{
a=0;
}
}
}
if(P30==0)
{
Delay(20);
if(P30==0)
{
Delay(20);
while(!P30);
Delay(20);
b++;
if(b>=10)
{
b=0;
a++;
}
}
}
if(P32==0)
{
Delay(20);
if(P32==0)
{
Delay(20);
while(!P32);
Delay(20);
c++;
if(c>=10)
{
c=0;
b++;
}
}
}
if(P33==0&&anjian==0)
{
Delay(20);
if(P33==0)
{
while(!P33);
zhan==first;
anjian=1;
first=0;
按位取余,就可以得到每一位的数字