Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- struct dadosImposto {
- string nome;
- float valor;
- };
- struct dadosNota {
- string descricao;
- float valor;
- string nome;
- };
- void lerImposto(int n){
- dadosImposto imposto[n];
- for (int i=0; i<n; i++)
- cin>>imposto[i].nome>>imposto[i].valor;
- }
- void notaDescricao(int n, string descricao[]){
- for (int i=0; i<n; i++)
- cin>>descricao[i];
- }
- void notaValor(int n, float valor[]) {
- for (int i=0; i<n; i++)
- cin>>valor[i];
- }
- void notaNome(int n, string nome[]) {
- for (int i=0; i<n; i++)
- cin>>nome[i];
- }
- void lerNota(int n){
- dadosNota nota[n];
- string descricao[n];
- float valor[n];
- string nome[n];
- notaDescricao(n, descricao);
- notaValor(n, valor);
- notaNome(n, nome);
- for (int i=0; i<n; i++){
- nota[i].descricao=descricao[i];//trocar pelos vetores q deveriam ser feitos
- nota[i].valor=valor[i];
- nota[i].nome=nome[i];
- }
- for (int i=0; i<n; i++)
- cout<<"yeis"<<endl;
- }
- float cadaImposto(float valorimposto,float valornota){
- int impostoCada;
- return impostoCada;
- }
- int main(){
- int nn;
- cin>>nn;
- lerNota(nn);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement