Baixe o app para aproveitar ainda mais
Prévia do material em texto
#include <iostream> using namespace std; int main(int argc, char** argv){ float A[3], B[3], RES[3]; cout<<"PRODUTO VETORIAL"<<endl; cout<<""<<endl; cout<<"DIGITE VETOR A"<<endl; cout<<"INSIRA O VALOR DE x:"<<endl; cin>>A[0]; cout<<"INSIRA O VALOR DE y:"<<endl; cin>>A[1]; cout<<"INSIRA O VALOR DE z:"<<endl; cin>>A[2]; cout<<""<<endl; cout<<"CARREGAR VETOR B"<<endl; cout<<"INSIRA O VALOR DE x:"<<endl; cin>>B[0];cout<<"INSIRA O VALOR DE y:"<<endl; cin>>B[1]; cout<<"INSIRA O VALOR DE z:"<<endl; cin>>B[2]; RES[0] = A[0]* B[0]; RES[1] = A[1]* B[1]; RES[2] = A[2]* B[2]; cout<<"TOTAL x= "<<RES[0]<<endl; cout<<"TOTAL y= "<<RES[1]<<endl; cout<<"TOTAL z= "<<RES[2]<<endl; system("pause"); }
Compartilhar