Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main (void)
- {
- float sal_base, gratif, sal_brut, imposto, sal_liq;
- printf("Informe o salario base: R$");
- scanf("%f", &sal_base);
- printf("Informe a gratificacao: ex: 5 para 5%%");
- scanf("%f", &gratif);
- sal_brut = sal_base + gratif/100 * sal_base;
- if(sal_brut<1000){
- imposto = sal_brut * (15/100);
- }
- else{
- imposto = sal_brut * (20/100);
- }
- sal_liq = sal_brut - imposto;
- printf("Salario liquido de R$%.2f", sal_liq);
- }
Advertisement
Add Comment
Please, Sign In to add comment