Jump to content


Photo

Multiplicacao De Matrizes


  • Faça o login para participar
15 replies to this topic

#1 Paulo André

Paulo André

    Why so serious?

  • Ex-Admins
  • 5114 posts
  • Sexo:Masculino
  • Localidade:Belo Horizonte - MG
  • Interesses:O.Q.F.J.?

Posted 06/09/2005, 20:54

alguem tem alguma ideia de como eu faria um sistema de multiplicacao de matrizes?

obrigado....

:wacko: Até mais
Paulo André G Rodrigues,
ex-administrador Fórum WMO.


www.CanalDev.com.br

#2 Felipe Pena

Felipe Pena

    O temor do Senhor é o princípio da sabedoria

  • Ex-Admins
  • 6441 posts
  • Sexo:Masculino

Posted 07/09/2005, 19:01

Veja um exemplo com vetores:

#include <stdio.h>
#include <stdlib.h>

int main()
{
    int x[6] = {1, 2, 3, 4, 5};
    int y[6] = {5, 4, 3, 2, 1};
    int i;

    for (i = 0; x[i]; i++)
        printf("x(%d) * y(%d) = %d\n", x[i], y[i], x[i] * y[i]);

    system("PAUSE");
    return 0;
}

Agora dá pra ter uma base, se é que sua dúvida estava incluida no código acima.

[]'s
Felipe Pena
[...] ó terra, terra, terra; ouve a palavra do Senhor. — Jeremias 22:29

#3 Ernesto Oleques

Ernesto Oleques

    Novato no fórum

  • Usuários
  • 2 posts
  • Sexo:Não informado

Posted 04/10/2006, 18:13

Multiplica duas matrizes
(acho que são essas as regras para se multiplicar duas matrizes):

Program multiplicacao_de_matrizes; 
Var matrizA: array [1..50,1..50] of integer; 
	matrizB: array [1..50,1..50] of integer; 
	matrizAB: array [1..50,1..50] of integer; 
	lin1, col1, lin2, col2, i, j, k: integer; 

Begin
 
	 writeln;
 
	 writeln('--------  Multiplicação de 2 matrizes  --------'); 
	 
	 writeln;
	 
	 writeln('Para ser possivel a multiplicação de duas matrizes');
	 writeln('	o numero de colunas da primeira matriz');
	 writeln(' deve ser igual ao numero de linhas da segunda');
	 
	 writeln;
	 
	write('Digite o numero de linhas da primeira matriz: '); 
	 readln(lin1);
	 
	write('Digite o numero de colunas da primeira matriz: '); 
	readln(col1);
	
	writeln;
	
	write('Digite o numero de linhas da segunda matriz: '); 
	readln(lin2);
	
	write('Digite o numero de colunas da segunda matriz: '); 
	readln(col2);  
	 
	 writeln;
	 
	 if ((col1)=(lin2)) then
	 begin
	 
	 writeln('Escreva os elementos da matriz A: ');	  
	 for i:=1 to lin1 do 
	  begin
		   for j:=1 to col1 do 
		   begin 
			   write('a',i,j,': '); 
			   readln(matrizA[i,j]); 
		   end;
	  end; 
	 
	  writeln;
	 
		 writeln('Escreva os elementos da matriz B: ');	  
	  for i:=1 to lin2 do 
	  begin 
		  for j:=1 to col2 do
		  begin 
			   write('b',i,j,': '); 
			   readln(matrizB[i,j]);
		  end;
	  end; 
	 
 
	  for i:=1 to lin1 do 
	  begin 
		  for j:=1 to col2 do 
		  begin
			   matrizAB[i,j]:=0; 
			   for k:=1 to lin1 do 
			   matrizAB[i,j]:=matrizAB[i,j]+matrizA[i,k]*matrizB[k,j];
		  end; 
	  end; 

	  writeln;
	 
	  writeln('A matriz A*B :'); 
	  for i:=1 to lin1 do 
	  begin 
		  for j:=1 to col2 do
		  write('ab',i,j,': ', matrizAB[i,j],' '); 
		  writeln;
	  end; 
	 end else writeln('Nao eh possivel multiplicar essas matrizes');
End.

by Ernesto

#4 HaroNism

HaroNism

    Super Veterano

  • Usuários
  • 13822 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 24/09/2017, 21:32

Acheter Du Tadalis Sx En Pharmacie Forum Viagra Alcool Vendita Viagra Napoli cialis Cialis Effet Avis E' Sicuro Comprare Viagra On Line

#5 Miguceamma

Miguceamma

    MiguPenjisse

  • Usuários
  • 11724 posts

Posted 27/09/2017, 15:29

Cephalexin 500mg Does Without Prescription Metronidazole Tablets Uk cialis Liquid Dramamine Cipa Canadian Pharmacy Accutane
Pfizer Viagra On Sale cialis buy online Order Levitra On Line Cephalexin Side Effects Indogs

#6 LarPhozyHah

LarPhozyHah

    Super Veterano

  • Usuários
  • 14515 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 02/10/2017, 23:42

Discount Stendra Quick Shipping Website Overseas Cod Accepted How To Pronounce Keflex viagra Amoxicillin Dosage Adult Male 220 Pounds

#7 RonsisM

RonsisM

    Super Veterano

  • Usuários
  • 15724 posts
  • Sexo:Masculino
  • Localidade:Plovdiv

Posted 05/10/2017, 06:46

Buy Diuretics Online Without Prescription Viagra Pfizer Bewertung Cialis En Tunisie viagra Poor Nutrition Propecia Viagra Rezeptfrei Schweiz Farmacia Online Propecia
Direct Isotretinoin Where To Order Medication Without Rx West Lothian online pharmacy Order Levitra Without A Prescription

#8 HaroNism

HaroNism

    Super Veterano

  • Usuários
  • 13822 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 07/10/2017, 14:27

Propecia Packungsgro?E Buy Doxycycline Boots viagra cialis Azithromycin
Pastilla Cialis Y Alcohol viagra Canadian Pharcharmy Online Buy Doxycycline In The Us

#9 LarPhozyHah

LarPhozyHah

    Super Veterano

  • Usuários
  • 14515 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 09/10/2017, 11:24

Mail Order Tab Amoxicilina In Internet Uni buy viagra online Cialis El Pais Depo Amoxicillin Propecia Sin Efectos Secundarios
Acheter Lasix viagra Bronchial Infection Amoxicillin
Lodine Online Without Precription Caracteristiques Clomid online pharmacy 2064 Prednisone For Sale Levitra Posologie Prix Cytotec

#10 HaroNism

HaroNism

    Super Veterano

  • Usuários
  • 13822 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 16/10/2017, 15:16

Sildenafil 100mg 30 Pills buygenericlevitraonlineusa Cialis Livraison Rapide En France
Ox Shelf Life Of Cephalexin viagra Do You Need A Prescription For Estrace Brand Viagra Online Canadian Pharmacy

#11 fapedlok

fapedlok

    Ativo

  • Usuários
  • 341 posts
  • Sexo:Masculino
  • Localidade:Brisbane

Posted 17/10/2017, 10:20

Discounts! top products for 2017

progect12.jpg
Products which fall under this return policy can be returned domestically, as long as they are unused and in the original packaging. No questions asked!
If a product that falls under this guarantee is found to be counterfeit, you will get a full refund (shipping costs included).

buy.png

READ MORE
7a brazilian virgin hair body wave 3 bundles lot human hair weave brazilian hair weave bundles ( 52.50 $)
ZoneAlarm | Maximum Protection. Best Performance. Great Price!
1 Case +30 Rolls Mixed Colors Nail Rolls Striping Tape Line DIY Nail Art Tips Decoration Sticker Nail Art Metallic Yarns Strips ( 4.86 $)
Kerui 99 wireless touch panel+lcd tft display gsm pstn sms home security voice burglar alarm engllish russian spanich france ( 131.39 $)
Merc | Clothing and footwear | Official store in Russia ©
Ulefone Be Touch 3 4G Phablet-149.14 $
Gold Plated Womens Ring ( 91.20 $)
Deem Deem Tana — Lyric Video / Shor In The City / Sachin Jigar / Tushar Kapoor
Ariana Grande — Everyday (Lyric Video) ft. Future
Newest Car Camera Car Dvr Blue Review Mirror Digital Video Recorder Auto Registrator Camcorder Full HD 1080P Camera Car Dvrs ( 59.98 $)
2015 newest fashionable cool men's clothing jumpsuit men slim plus size s l m l xl ( 142.80 $)
Simple short sleeve scoop collar button design women's crop top ( 8.90 $)
Ruthenium Plated Sterling Silver Cut Out Tiger Bracelet ( 138.00 $)
Indian Virgin Hair Water Wave 4 Bundle Indian Curly Virgin Hair Raw Indian Water Wave Virgin Hair Curly Weave Human Hair Bundles ( 50.00 $)
7a grade brazilian straight virgin hair 4pcs unprocessed virgin brazilian hair weave bundles 100% brazilian virgin hair straight ( 111.72 $)


29.jpg

#12 HaroNism

HaroNism

    Super Veterano

  • Usuários
  • 13822 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 18/10/2017, 05:21

Zithromax Dosage Chart By Weight Buy Nexium Online Uk viagra Comprar Viagra Online Sin Receta Medica Md Price Pharmacy Discounts
Cheap Valtrex Uk Precio De Priligy 30 Mg Recensione Kamagra Generic cialis Levitra Nuevo
Amoxicillin Dosage For Cats Bentyl Muscle Spasms Internet Mastercard Accepted Without Perscription Swollen Tongue Amoxicillin Newborn viagra Acheter Levitra 20mg Pharmacie Bentyl Saturday Delivery No Script Needed Store Cash Delivery Propecia Hort Auf Zu Wirken
Furosemide Over The Counter Substitute buy cialis Last Longer Naturally
Buy viagra prescription Cialis 20mg Testberichte

#13 HaroNism

HaroNism

    Super Veterano

  • Usuários
  • 13822 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 02/11/2017, 11:39

Priligy Official Site Acheter Du Baclofene viagra Zithromax Erythromycin Canada Viagra Online
Brescia Vendo Cialis Super Cialis On Line buy viagra Mysearchdial
Viagra Gocce Per Donne buy viagra online Cialis Prezzo Confezione Cialis 4 Comprimes

#14 HaroNism

HaroNism

    Super Veterano

  • Usuários
  • 13822 posts
  • Sexo:Masculino
  • Localidade:San Miguel de Tucuman

Posted 29/11/2017, 01:39

Priligy Nausea cialis Avodart Venta De Viagra En Barcelona
Rx Customer Care Cephalexin Side Effects Thirst China Priligy Alkohol viagra Cialis Per Quanto How Long Does Zithromax Last
Clomid Mois Ovulation cialis price Kamagra Pour Femme

#15 RonsisM

RonsisM

    Super Veterano

  • Usuários
  • 15724 posts
  • Sexo:Masculino
  • Localidade:Plovdiv

Posted 30/11/2017, 01:38

Suprax canadian levitra Viagra Opiniones Viagra Without Perscriptions
Propecia Shed Hair Loss Tadalafil 20 Mg Sublingual buy viagra Buy Generic Effexor Online Viagrawithoutprescription.Us Over The Counter Cialis
Canine Use Of Amoxicillin Minipress Amoxicillin And Clavulanate Potassium Augmentin cialis Amoxicillin Doxycycline
Comprar Cytotec En Estados Unidos viagra Amoxicillin The Right Dose Isotretinoin Amnesteem Skin Health Medicine On Line Viagra Pas Marche




1 user(s) are reading this topic

0 membro(s), 1 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq