This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

8051

I run the following program in keil software....it shows 18 error....all the errors are
undefined identifier error....
MAIN.C(7): error C202: 'k': undefined identifier
MAIN.C(10): error C202: 'v': undefined identifier
MAIN.C(11): error C202: 'p': undefined identifier
MAIN.C(12): error C202: 'p': undefined identifier
MAIN.C(14): error C202: 'v': undefined identifier
MAIN.C(15): error C202: 'vop': undefined identifier
MAIN.C(17): error C202: 'vop': undefined identifier
MAIN.C(22): error C202: 'vop': undefined identifier
give a solution to correct my error....

void main()
{ float v=0,i=0,p=0,vop=0,p1=0,v1=0;
for(int k=0;k<2;k++)
{ printf("\nenter the voltage and current value");
scanf("%f%f",&v,&i);
p=v*i;
if(p>p1)
{ if(v>v1)
vop=v+0.5;
else
vop=v-0.5;
} else
{ if(v.v1)
vop=v-.5;
else
vop=v+.5;
} p1=p;
v1=v;
printf("\nthe output voltage is%f",vop);
} }

0