Program isn't printing correctly

后端 未结 5 1371
醉酒成梦
醉酒成梦 2021-01-28 04:52

I believe my program is still going through the if statements after it is declared invalid. It should print invalid filling status or invalid exemption status on the same line w

5条回答
  •  忘掉有多难
    2021-01-28 05:52

    change this

     else
        {       
            printf("\n**** Invalid filling status ****");
        }
    
        if (taxExemptions > 12  || taxExemptions < 0)
        {       
            printf("\n**** Invalid exemptions status ****");
        } 
    

    to

    else
        {       
            printf("\n**** Invalid filling status ****");  
            continue;
        }
    
        if (taxExemptions > 12  || taxExemptions < 0)
        {       
            printf("\n**** Invalid exemptions status ****");
            continue;
        } 
    

提交回复
热议问题