Identity and correct the errors in each of the following statements
1)answer = 2Y + 4(z*)2;
2)if(x=1);
printf("Equal to 1");
printf("End of if");
else
printf("Not Equal to 1");
printf("End of else");
3)x =1;
while (x<=5)
total =total + x;
x++;
1) number = 2*Y + 4*z*2;
2)if(x=1)
{
printf("Equal to 1");
printf("End of if");
}
else
{
printf("Not Equal to 1");
printf("End of else");
}
3) x=1;
while (x<=5)
{
total =total + x;
x++;
}
Comments
Leave a comment