Describe if statement. Write an if statement to multiply even numbers by 3 and odd numbers by 4.
Answers
Answered by
1
int a,b;
scanf("%d",&a);
if(a%2==0)
{b=a*3;
}
else
{
b=a*4;
}
scanf("%d",&a);
if(a%2==0)
{b=a*3;
}
else
{
b=a*4;
}
Similar questions