C语言编程,大虾帮忙看一下

2024-12-01 03:01:46
推荐回答(4个)
回答1:

#include "stdio.h"
main()
{
float jbgz,wjgz,fzgz;
printf("请输入员工基本工资:");
scanf("%f",&jbgz);
wjgz=jbgz*0.4;
fzgz=jbgz*0.2;
printf("员工实际工资为:%f",jbgz+wjgz+fzgz);
}

回答2:

main()
{float a,b,c;
scanf("%d",&a);
b=a*0.4;
c=a*0.2;
printf("%f\n",a+b+c);
}

回答3:

#include
int main()
{
int staff_wage;
int price_subsidy ;
int rent_allowance ;
printf("please input basic wage:");
scanf("%d",&staff_wage);
price_subsidy = staff_wage*0.4;
rent_allowance= staff_wage*0.2;
staff_wage += price_subsidy + rent_allowance;
printf("\nthe staff wage is :%d",staff_wage);

}

回答4:

static void Main(string[] args)
{
//员工输入的工资
double a = 0;
//员工的实际工资
double b = 0;
Console.WriteLine("请输入您的工资:");
a = double.Parse(Console.ReadLine());
Console.WriteLine(a);
b = a * 0.4 + a * 0.2 + a;
string c = string.Format("该向员工支付的实际工资是:{0}",b.ToString());
Console.WriteLine(c);
}