FlashCards

Description

Flashcards on FlashCards, created by DIANA-ELENA DINU on 26/05/2020.
DIANA-ELENA DINU
Flashcards by DIANA-ELENA DINU, updated more than 1 year ago
DIANA-ELENA DINU
Created by DIANA-ELENA DINU over 4 years ago
0
0

Resource summary

Question Answer
Citire matrice void citire(int a[][10],int &n,int &m) {int i,j; cout<<"dati nr de linii:";cin>>n; cout<<"dati nr de coloane:";cin>>m; cout<<"dati elem:"; for(i=0;i<n;i++) for(j=0;j<m;j++) {cout<<"a["<<i<<"]["<<j<<"]="; cin>>a[i][j]; } }
Afisare matrice void afisare(int a[][10],int n,int m) {int i,j; for(i=0;i<n;i++) {for(j=0;j<m;j++) cout<<a[i][j]<<' '; cout<<endl; } }
Adunarea matricilor int main(){ int a[100][100],b[100][100],na,ma,nb,mb,i,j; fin>>na>>ma>>nb>>mb; for(i=1;i<=na;i++)for(j=1;j<=ma;j++) fin>>a[i[j]; for(i=1;i<=nb;i++)for(j=1;j<=mb;j++) fin>>b[i][j]; //Suma nu este posibila decat daca na=nb si ma=mb if(na==nb&&ma==mb){ for(i=1;i<=na;i++){ for(j=1;j<=ma;j++) fout<<a[i][j]+b[i][j]<< ' '; fout<<endl;}
Inmulțirea a două matrice //inmultirea a doua matrice void inmultire(matrice x, matrice y, matrice z, int n) /* in acest caz putem returna matricea prin tipul rezultat, pentru matricea este un pointer (o adresa) */ { for(int i=0;i<n;i++) for(int j=0;j<n;j++) { z[i][j]=0; for(int k=0;k<n;k++) z[i][j]+=x[i][k]*y[k][j]; } }
Show full summary Hide full summary

Similar

MODE, MEDIAN, MEAN, AND RANGE
Elliot O'Leary
New Possibilities with ExamTime's Flashcard Maker
Andrea Leyden
Making the Most of GoConqr Flashcards
Sarah Egan
General questions on photosynthesis
Fatima K
CITAÇÕES DE GRANDES FILÓSOFOS
miminoma
Flashcards for CPXP exam
Lydia Elliott, Ed.D
GoConqr Getting Started Guide
Norman McBrien
Theories of Religion
Heloise Tudor
A-LEVEL ENGLISH LANGUAGE : Key Theorists
Eleanor H
Biological Definitions
Yamminnnn
ICT GCSE flashcards
Catherine Archer