آموزش ++C آموزش و سورس های برنامه نویسی به زبان ++C |
||||||||||||||||||||||||||||||||||||
شنبه 9 ارديبهشت 1391برچسب:, :: 21:13 :: نويسنده : کیوان مجنونی
برنامه ای که ضرب دو ماتریس با ابعاد m*n و n*p را پیاده سازی میکند.
//This program calculates the product of 2 matrix.
#include #include #include int main() { int m,n,p; cout<<"Enter size of tow integer matrix to get the product of them.\n"; cout<<"Enter size of first matrix A(m*n).\n"; cout<<"Enter m = "; cin>>m; cout<<"Enter n = "; cin>>n; vector cout<<"\nEnter size of second matrix B(" < cin>>p; vector clrscr(); cout<<"Enter Matrix A members:\n"; for(int i=0;i cout<<"Enter A["<<(i+1)<<"]["<<(j+1)<<"] ="; cin>>A[i][j]; } cout<<"\nEnter Matrix B members:\n"; for(i=0;i cout<<"Enter B["<<(i+1)<<"]["<<(j+1)<<"] ="; cin>>B[i][j]; } vector for(i=0;i clrscr(); for(i=0;i for(int j=0;j cout< return 0; } //end
نظرات شما عزیزان:
salam azizam.web khobi dari.aghe khasti be man ham sar bezan.tabadol hasti?
آخرین مطالب آرشيو وبلاگ پیوندهای روزانه پيوندها
![]() نويسندگان
|
||||||||||||||||||||||||||||||||||||
![]() |