Can someone explain to me how to make this kinda output?

0 votes
asked Nov 18, 2019 by syazwan sharil (130 points)
retagged Nov 19, 2019 by syazwan sharil

Please enter the number of employees => 2

Please enter the basic salary => 8500

Please enter the EPF contribution (11% or 13%) => 13

Housing allowance applied (Y or N) => Y

The net salary is RM5525

1 Answer

+1 vote
answered Nov 19, 2019 by rohan ag (1,150 points)
see i will send you the format make some modifications on your wish

#include <stdio.h>

int main()
{
    
    int em,sal;
    float num;
    char ch;
    printf("enter number of employees");
    scanf("%d",&em);
     printf("enter basic salary");
     scanf("%d",&sal);
    
       printf("enter enter epf");
        scanf("%f",&num);
    if(num==11)
    {
        
    }
   else if(num==13)
   {
       
   }
printf("house allowenes is applied or no(Y/N)")
scanf(" %c"&ch);
if(ch=='Y'||ch=='y')
{
    
}

else
{
    
}
    return 0;
}
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...