Bun venit Guest | RSS
Bine ati venit la 9C acasa
Meniul Site-ului
Horoscop
Exprima-ti opinia
Ce parere aveti despre site?
1. Foarte buna
2. Foarte proasta
3. Buna
4. Normal
5. Proasta
[ Vezi rezutat ยท Arhiva ]
Raspunsuri: 42
Mini chat

Info


Main » 2009 » Mai » 20 » produs cu un scalar
produs cu un scalar
18:54

#include<iomanip.h>
#include<iostream.h>
#include<conio.h>
int n,m,a[10][10],b[10][10],c[10][10],k,p;
void main()
{
cout<<"n="; cin>>n;
cout<<"m="; cin>>m;
cout<<"k="; cin>>k;
int i,j;

for(i=0;i<n;i++)
for(j=0;j<m;j++)
{cout<<"a["<<i+1<<"]["<<j+1<<"]=";
cin>>a[i][j];}

for(i=0;i<n;i++)
for(j=0;j<m;j++)
c[i][j]=a[i][j]*k;

for(i=0;i<n;i++){
for(j=0;j<m;j++)
cout<<setw(4)<<a[i][j]<<" ";
cout<<endl;}
cout<<"produslui scalar este:"<<endl;
for(i=0;i<n;i++){
for(j=0;j<m;j++)
cout<<setw(4)<<c[i][j]<<" ";
cout<<endl;}}

 

Views: 90 | Added by: Iulian
Only registered users can add comments.
[ Registration | Login ]
Logheaza-te
Calendar
«  Mai 2009  »
DuLuMaMiJoViSa
     12
3456789
10111213141516
17181920212223
24252627282930
31
Meteo
Curs Valutar
Curs Valutar BNR
Cautare
Link-uri
Statistica
Director web gratuit - Afisare Thumbnail, Transfer Google PageRank, Meta keywords si meta description personalizate pentru fiecare link Site clasei 9C Colegiul National Mihai Eminescu, Muzica Stiri Sport, Filme Top66 Statistici
Total online: 1
Guests: 1
Users: 0