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 » 2011 » Februarie » 7 » citire/afisare date.in graf
citire/afisare date.in graf
09:52
#include<iostream.h>
#include<fstream.h>

int i,n,j,a[10][10];
ifstream f;

void afisare(int a[10][10], int n)
{for(i=1;i<=n;i++)
{for(j=1;j<=n;j++)
cout<<a[i][j]<<" ";
cout<<endl;}}

void main()
{f.open("date.in");
f>>n;
for(i=1;i<=n;i++)
for(j=1;j<=n;j++)
f>>a[i][j];
f.close();
afisare(a,n);}


date.in

7
0 1 1 0 0 0 0
1 0 0 0 1 0 0
1 0 0 1 1 0 0
0 0 1 0 1 0 1
0 1 1 1 0 0 0
0 0 0 0 0 0 0
0 0 0 1 0 0 0

Views: 433 | Added by: Iulian
Only registered users can add comments.
[ Registration | Login ]
Logheaza-te
Calendar
«  Februarie 2011  »
DuLuMaMiJoViSa
  12345
6789101112
13141516171819
20212223242526
2728
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