Donanım Merkezi
 

Geri git   Donanım Merkezi > Yazılım > Programlama

Cevapla
 
LinkBack Seçenekler Stil
Alt 10-29-2006, 07:45 PM   #1 (permalink)
DM Sever
 
Üyelik tarihi: Jan 2006
Nerden: Ankara
Mesajlar: 128
İtibar Gücü: 0 kendo is an unknown quantity at this point
kendo - MSN üzeri Mesaj gönder
C++ 2 matrisin çarpimini bulur

Alıntı:
#define MAX 10

class matrix
{
int m1[MAX][MAX],m2[MAX][MAX],c[MAX][MAX];
int i,j,k,sayi;
public:
void matris_al(int);
void matris_yaz(int);
void matris_carp(int);
void matris_sifir(int);
};

void matrix::matris_al(int a)
{
cout<<"1. matrisi girin:"<<"\n\n";
for(i=0; i<a; i++)
{
for(j=0; j<a; j++)
{
cout<<(i+1)<<". satir "<<(j+1)<<". sutun:";
cin>>sayi;
m1[i][j]=sayi;
}
}
clrscr();
cout<<"2. matrisi girin:"<<"\n\n";
for(i=0; i<a; i++)
{
for(j=0; j<a; j++)
{
cout<<(i+1)<<". satir "<<(j+1)<<". sutun:";
cin>>sayi;
m2[i][j]=sayi;
}
}

}
void matrix::matris_yaz(int a)
{
cout<<"carpim matrisi:"<<endl;
for(i=0; i<a; i++)
{
for(j=0; j<a; j++)
{
cout<<c[i][j]<<"\t";
}
cout<<"\n";
}

}
void matrix::matris_sifir(int a)
{
for(i=0; i<a; i++)
{
for(j=0; j<a; j++)
{
c[i][j]=NULL;
}
}
}
void matrix::matris_carp(int a)
{
for(i=0; i<a; i++)
{
for(j=0; j<a; j++)
{
for(k=0; k<a; k++)
{
c[i][j]+=m1[i][k]*m2[k][j];
}
}
}
}

main()
{
int a;
char ch;
do
{
gel:
clrscr();
cout<<"kaca kaclik matris:";
cin>>a;
if(a<2)
{
printf("2'den kucuk giremessin..");goto gel;
}
clrscr();
matrix mt;
mt.matris_sifir(a);
mt.matris_al(a);
clrscr();
mt.matris_carp(a);
mt.matris_yaz(a);
getch();clrscr();
cout<<"devam etmek icin e'ye bas...";
}while((ch=getche())=='e') ;
}
kendo Çevrimdışı  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Stumble this Post!Google Bookmark this Post!
Alıntı ile Cevapla
Alt 11-09-2006, 01:58 AM   #2 (permalink)
DM Sever
 
Üyelik tarihi: Jan 2006
Nerden: Ankara
Mesajlar: 128
İtibar Gücü: 0 kendo is an unknown quantity at this point
kendo - MSN üzeri Mesaj gönder
Arkadaşlar bi yorum yazmak bi teşekkür etmek bu kadarmı zor
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
kendo Çevrimdışı  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Stumble this Post!Google Bookmark this Post!
Alıntı ile Cevapla
Alt 11-09-2006, 12:17 PM   #3 (permalink)
Yeni Üye
 
Üyelik tarihi: Oct 2006
Nerden: bursa
Mesajlar: 14
İtibar Gücü: 0 coding-system is an unknown quantity at this point
coding-system - MSN üzeri Mesaj gönder
saol güzeldi
coding-system Çevrimdışı  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Stumble this Post!Google Bookmark this Post!
Alıntı ile Cevapla
Sponsor Linkler
Cevapla



Konuyu Toplam 1 Üye okuyor. (0 Kayıtlı üye ve 1 Misafir)
 
Seçenekler
Stil

Yetkileriniz
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is Açık
Smileler Açık
[IMG] Kodları Açık
HTML-KodlarıKapalı
Trackbacks are Açık
Pingbacks are Açık
Refbacks are Açık


Bütün Zaman Ayarları WEZ +4 olarak düzenlenmiştir. Şu Anki Saat: 01:27 PM .


Donanım forumu - oyun - gtaoyun hilelerioyun - voip  - eğlence - barbie oyunları
 

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0