逻辑错误吗,为什么输出都是2686728
#include <stdio.h>int main(void)
{
int profit,salary;
printf("input a salary:");
scanf("%d",&profit);
if(profit<=1000)
{salary=500;}
else if(profit>1000&&profit<=2000)
{
salary=500+profit*0.10;}
else if(profit>2000&&profit<=5000)
{salary=500+profit*0.15;}
else if(profit>5000&&profit<=10000)
{
salary=500+profit*0.20;}
else if(profit>10000)
{
salary=500+profit*0.25;}
printf("salary=:%d",&salary);
}