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 » 6 » program
program
18:35
// se citesc 2 vectori de aceasi dimenstiuine sa se afise produsul cartezian al el celor 2 vect
#include<iostream.h>
#include<iomanip.h>
#include<math.h>
void main()
{
unsigned i,n,s,ma,k;
int a[20],b[20];
cout<<"n=";
cin>>n;
k=0;
s=0;
for(i=0;i<n;i++)
{cout<<"a["<<i+1<<"]=";
cin>>a[i];}
for(k=0;k<n;k++)
{cout<<"b["<<k+1<<"]=";
cin>>b[k] ;
}
cout<<"produsul cartezian este"<<endl;
for(i=0;i<n;i++)
cout<<a[i]<<" ";
cout<<endl;
for(k=0;k<n;k++)
cout<<b[k]<<" ";
cout<<endl;
ma=s/n;
for(i=0;i<n;i++)
{for(k=0;k<n;k++)
cout<<"("<<a[i]<<","<<b[k]<<")"<<" ";

}}


 

Views: 109 | 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