#include <iostream>
#include <string>
using namespace std;
int main( ) {
int cont = 1 , tinss;
string s, resp, nome;
float sal, novosala, val;
do {
cout << endl << "digite o nome do funcionario: " ;
cin >> nome;
cout << endl << "digite o salario do funcionario: " ;
cin >> 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 ;
}
cout << endl << "Nome: " << nome << endl;
cout << "Salario bruto: " << sal << endl;
cout << "Taxa de INSS: " << tinss << endl;
cout << "Valor de INSS " << val << endl;
cout << "Salario liquido: " << novosala << endl;
cout << endl << "deseja continuar ? " << endl;
cin >> resp;
cont++ ;
}
while ( resp == "s" ) ;
return 0 ;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglpbnQgY29udCA9IDEsIHRpbnNzOwoJc3RyaW5nIHMsIHJlc3AsIG5vbWU7CglmbG9hdCBzYWwsIG5vdm9zYWxhLCB2YWw7IAoJZG8gewoJCWNvdXQgPDwgZW5kbCA8PCAiZGlnaXRlIG8gbm9tZSBkbyBmdW5jaW9uYXJpbzogIjsKCQljaW4gPj4gbm9tZTsKCQljb3V0IDw8IGVuZGwgPDwgImRpZ2l0ZSBvIHNhbGFyaW8gZG8gZnVuY2lvbmFyaW86ICI7CgkJY2luID4+IHNhbDsKCQkJCQoJCWlmKHNhbCA8PSA1MDApIHsKCQkJbm92b3NhbGEgPSBzYWwgLSAoKHNhbCAvIDEwMCkgKiA4KTsKCQkJdmFsID0gKHNhbCAvIDEwMCkgKiA4OwoJCQl0aW5zcyA9IDg7CQkJ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