1 条题解

  • 0
    @ 2024-12-18 14:07:30

    C :

    #include<stdio.h>
    
    int main()
    {
        char name[11];
        double d, x, m;
        
        scanf("%s\n%lf\n%lf",&name, &d, &x);
        
        m = d + x * 0.15;
        
        printf("TOTAL = R$ %.2lf", m);
        
        
        return 0;
    }
    

    C++ :

    #include<stdio.h>
    int main()
    {
    	char name[11];
    	float dixin,edu,TOTAL;
    	
    	scanf("%s",&name);
    	scanf("%f%f",&dixin,&edu);
    	TOTAL=dixin+edu*0.15;
    	printf("TOTAL = R$ %.2f",TOTAL);
    	return 0;
    	 
    }
    
    • 1

    信息

    ID
    659
    时间
    1000ms
    内存
    128MiB
    难度
    6
    标签
    提交数
    110
    已通过
    35
    上传者