تبلیغات
دانلود سورس پروژه های مختلف برنامه نویسی، آموزش برنامه نویسی - ضرب ماتریس ها در سی
دانلود سورس پروژه های مختلف برنامه نویسی، آموزش برنامه نویسی
دانلود رایگان سورس پروژه
سایت برنامه نویسی تک کدر takcoder.ir


آموزش برنامه نویسی با استفاده از نوین ترین روش و ارائه پروژه های نمونه و مجموعه عظیم سورس کدهای آماده برای شما دوستان

مدیر سایت : Yahya Taherzadeh
نویسندگان
نظرسنجی
زبان برنامه نویسی مورد علاقه شما؟






برنامه درخواستی: دو تا آرایه بگیرد و در هم ضرب کرده و جواب را در آرایه سوم قرار داده و چاپ نماید. این برنامه را باید با قوانین ضرب ماتریس ها حل کرد، به همین خاطر شرطهایی  برای مسئله در نظر بگیریم. در شکل همه چی واضح می باشد.


  \overset{3\times 4 \text{ matrix}}{\begin{bmatrix}
     \cdot & \cdot & \cdot & \cdot \\
     \cdot & \cdot & \cdot & \cdot \\
     \color{Blue} 1 & \color{Blue} 2 & \color{Blue} 3 & \color{Blue} 4 \\
  \end{bmatrix}}
  \overset{4\times 5\text{ matrix}}{\begin{bmatrix}
    \cdot & \cdot & \cdot & \color{Red}a & \cdot \\
    \cdot & \cdot & \cdot & \color{Red}b & \cdot \\
    \cdot & \cdot & \cdot & \color{Red}c & \cdot \\
    \cdot & \cdot & \cdot & \color{Red}d & \cdot \\
  \end{bmatrix}}
=
\overset{3\times 5\text{ matrix}}{
\begin{bmatrix}
\cdot & \cdot & \cdot & \cdot & \cdot \\
\cdot & \cdot & \cdot & \cdot & \cdot \\
\cdot & \cdot & \cdot & x_{3,4} & \cdot \\
\end{bmatrix}}

#include<stdio.h>
#include<conio.h>
#define x 50

void main()
{

int A[x][x],B[x][x],C[x][x],i,j,m,n,p,q,k;

printf("andis haye araye 1 ra vared konid: ");
scanf("%d",&m);
scanf("%d",&n);
printf("andis haye araye 2 ra vared konid: ");
scanf("%d",&p);
scanf("%d",&q);
printf("\n\n---------------------------------------\n");
if(n == p)
{
printf("adade darone araye 1 ra vared konid: \n\n");
for(i=1;i<=m;i++)
{
for(j=1;j<=n;j++)
{
scanf("%d",&A[i][j]);
}
printf("\n");
}
printf("adade darone araye 2 ra vared konid: \n\n");
for(i=1;i<=p;i++)
{
for(j=1;j<=q;j++)
{
scanf("%d",&B[i][j]);
}
printf("\n");
}

for(i=1;i<=m;i++)
for(j=1;j<=q;j++)
{
C[i][j] = 0;
for(k=1;k<=n;k++)
C[i][j] = C[i][j] + (A[i][k] * B[k][j]);
}


printf("matrsie hasel:\n\n\t\t ");
for(i=1;i<=m;i++)
{
for(j=1;j<=q;j++)
printf("   %d",C[i][j]);
printf("\n\n\t\t\t ");
}
}
else
{
printf("mahdode dorost vared nashode, bayad tedade sotnhaye araye 1 ba tedade radif haye araye 2 barabar bashadn ke betavan zarb kard");
}
printf("\n\n---------------------------------------\n");
getch();
}




نوع مطلب : تیکه کد، سی| سی پلاس پلاس، آموزش، برنامه| پروژه های درخواستی، 
برچسب ها : برنامه های درخواستی، ضرب دو ماتریس، ضرب دو آرایه در سی، ضرب کردن آرایه ها در سی پلاس، سورس های درخواستی، آموزش برنامه نویسی، سورس های سی پلاس،
لینک های مرتبط :
Yahya Taherzadeh
پنجشنبه 21 آذر 1392
سه شنبه 24 مهر 1397 04:32 ب.ظ
Hey there would you mind sharing which blog
platform you're using? I'm going to start my own blog in the near future but
I'm having a difficult time deciding between BlogEngine/Wordpress/B2evolution and Drupal.
The reason I ask is because your layout seems different then most blogs and I'm looking for something completely unique.

P.S Sorry for getting off-topic but I had to ask!
سه شنبه 17 مهر 1397 12:20 ب.ظ
Excellent web site you have got here.. It's hard to find good quality writing like yours these days.
I seriously appreciate individuals like you! Take care!!
سه شنبه 17 مهر 1397 03:47 ق.ظ
Now I am ready to do my breakfast, when having my
breakfast coming again to read more news.
شنبه 14 مهر 1397 05:12 ق.ظ
It's very trouble-free to find out any topic on web as compared to
books, as I found this article at this website.
جمعه 13 مهر 1397 10:56 ق.ظ
Hi friends, how is all, and what you desire to say
regarding this article, in my view its really awesome for me.
دوشنبه 9 مهر 1397 12:33 ب.ظ
It is the best time to make a few plans for the future and it's time to be happy.
I've read this put up and if I could I want to recommend you some fascinating issues or tips.

Maybe you can write subsequent articles regarding this article.
I wish to read more things about it!
دوشنبه 9 مهر 1397 09:36 ق.ظ
Superb blog! Do you have any helpful hints for aspiring writers?
I'm planning to start my own website soon but I'm a little lost
on everything. Would you advise starting with a free platform like
Wordpress or go for a paid option? There are
so many options out there that I'm completely overwhelmed ..
Any recommendations? Cheers!
دوشنبه 9 مهر 1397 07:10 ق.ظ
Way cool! Some extremely valid points! I appreciate you penning this article and also the rest of the site is really good.
جمعه 30 شهریور 1397 11:39 ق.ظ
Hi! Do you know if they make any plugins to protect against hackers?
I'm kinda paranoid about losing everything I've worked hard on. Any tips?
جمعه 23 شهریور 1397 11:26 ب.ظ
I pay a visit every day a few blogs and blogs to read
articles or reviews, but this website presents feature based articles.
چهارشنبه 21 شهریور 1397 02:12 ق.ظ
Everyone loves what you guys are up too. This type of clever work and reporting!

Keep up the superb works guys I've you guys to my blogroll.
دوشنبه 19 شهریور 1397 12:17 ب.ظ
If some one needs expert view regarding blogging and
site-building then i advise him/her to pay a
quick visit this blog, Keep up the nice work.
شنبه 17 شهریور 1397 11:08 ق.ظ
Do you have a spam problem on this website; I also am a blogger,
and I was wondering your situation; many of us have developed some nice practices and we are looking
to exchange techniques with other folks, why not shoot me
an email if interested.
شنبه 25 شهریور 1396 07:53 ب.ظ
I know this if off topic but I'm looking into starting my
own weblog and was curious what all is required to get set up?
I'm assuming having a blog like yours would cost a pretty penny?

I'm not very web smart so I'm not 100% positive.
Any recommendations or advice would be greatly appreciated.
Kudos
شنبه 14 مرداد 1396 09:26 ب.ظ
It's an remarkable post for all the online users;
they will take benefit from it I am sure.
جمعه 13 مرداد 1396 09:27 ب.ظ
Superb website you have here but I was curious about if you knew of any user discussion forums that cover
the same topics discussed here? I'd really love to be a part
of group where I can get feedback from other knowledgeable individuals that share
the same interest. If you have any suggestions, please let
me know. Kudos!
جمعه 6 مرداد 1396 08:00 ب.ظ
It's awesome to go to see this web site and reading the views of all colleagues concerning this article, while I am also zealous of getting know-how.
دوشنبه 12 تیر 1396 11:38 ق.ظ
Ridiculous story there. What occurred after?
Good luck!
دوشنبه 18 اردیبهشت 1396 03:20 ق.ظ
Thanks a lot for sharing this with all folks you actually understand what you
are talking approximately! Bookmarked. Kindly also seek advice from my web site =).
We can have a hyperlink change contract among us
چهارشنبه 13 اردیبهشت 1396 09:57 ب.ظ
I have learn a few excellent stuff here. Definitely
price bookmarking for revisiting. I surprise how so much effort you place to make this sort of wonderful informative
web site.
چهارشنبه 13 اردیبهشت 1396 02:26 ب.ظ
I love what you guys are up too. Such clever work and reporting!
Keep up the good works guys I've incorporated you guys
to my own blogroll.
یکشنبه 27 فروردین 1396 03:06 ق.ظ
Paragraph writing is also a excitement, if you be familiar with after that you can write
or else it is complicated to write.
جمعه 25 فروردین 1396 09:00 ق.ظ
After going over a number of the blog articles on your web site, I truly like your technique of writing a blog.
I added it to my bookmark website list and will be checking back soon. Please check out my web site too and tell me what you think.
 
لبخندناراحتچشمک
نیشخندبغلسوال
قلبخجالتزبان
ماچتعجبعصبانی
عینکشیطانگریه
خندهقهقههخداحافظ
سبزقهرهورا
دستگلتفکر




صفحات جانبی
آمار وبلاگ
تاییدیه پرداخت
تبلیغات
به سایت تک کدر خوش آمدید