#include <stdio.h>
int main( ) {
int cont, tinss;
char s, resp, nome[ 50 ] ;
float sal, novosala, val;
cont = 1 ;
do
{
printf ( "\n digite o nome do funcionario; " ) ;
scanf ( "%s" ,& nome) ;
printf ( "\n digite o salario do funcionario: " ) ;
scanf ( "%f" ,& sal) ;
if ( sal <= 500 )
{
novosala = sal - ( ( sal / 100 ) * 8 ) ;
val = ( sal / 100 ) * 8 ;
tinss = 8 ;
}
else
if ( sal > 500 && sal <= 1000 )
{
novosala = sal - ( ( sal / 100 ) * 10 ) ;
val = ( sal / 100 ) * 10 ;
tinss = 10 ;
}
else
if ( sal > 1000 )
{
novosala = sal - ( ( sal / 100 ) * 12 ) ;
val = ( sal / 100 ) * 12 ;
tinss = 12 ;
}
printf ( "\n Nome: %s \n " ,nome) ;
printf ( "\n Salario bruto: %f \n " , sal) ;
printf ( "\n Taxa de INSS: %d% \n " , tinss) ;
printf ( "\n Valor de INSS %f \n " , val) ;
printf ( "\n Salario liquido: %f \n " , novosala) ;
printf ( "\n deseja continuar ? \n " ) ;
scanf ( "%s" ,& resp) ;
cont = cont + 1 ;
}
while ( resp == 's' ) ;
return 0 ;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbigpIHsKCWludCBjb250LCB0aW5zczsKCQoJY2hhciBzLCByZXNwLCBub21lWzUwXTsKCQoJZmxvYXQgc2FsLCBub3Zvc2FsYSwgdmFsOyAKCQoJY29udCA9IDE7CgkKCWRvCgl7CgkJcHJpbnRmKCJcbiBkaWdpdGUgbyBub21lIGRvIGZ1bmNpb25hcmlvOyAiKTsKCQlzY2FuZigiJXMiLCZub21lKTsKCQlwcmludGYoIlxuIGRpZ2l0ZSBvIHNhbGFyaW8gZG8gZnVuY2lvbmFyaW86ICIpOwoJCXNjYW5mKCIlZiIsJnNhbCk7CgkJCQkKCQlpZihzYWwgPD0gNTAwKQoJCQl7CgkJCQlub3Zvc2FsYSA9IHNhbCAtICgoc2FsIC8gMTAwKSAqIDgpOwoJCQk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