Main
unknown
plain_text
3 years ago
838 B
3
Indexable
#include "Funzioni.h" /* run this program using the console pauser or add your own getch, system("pause") or input loop */ int main(int argc, char** argv) { int n, m; int o = 0; vettore v1; vettore v2; vettore v3; if (input(n, v1)){ cout << "\nVettore inserito correttamente"<<endl; } cout <<endl; if (input(m, v2)){ cout << "\nVettore inserito correttamente"<<endl; } cout <<endl; if (n != m){ cout << "Errore! I due vettori non hanno la stessa lunghezza" <<endl; exit (1); } stampa(n , v1); cout <<endl; stampa(m, v2); cout << endl; system ("pause"); system ("cls"); crea(n, o, v3, v2, v1); cout<<"Vettore creato: "; stampa(o,v3); cout <<endl; if(!controlla(o, v3)){ elimina(o, v3); cout << "\nVettore modificato: "; stampa(o,v3); } return 0; }
Editor is loading...