Cod sursa(job #230842)
| Utilizator | Data | 14 decembrie 2008 10:42:45 | |
|---|---|---|---|
| Problema | Tablete | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Algoritmiada 2009, Runda 1, Clasele 5-8 | Marime | 0.49 kb |
#include <iostream.h>
#include <fstream.h>
fstream f("tablete.in", ios::in)
fstream g("tablete.out", ios::out)
void main ()
{
int n,k,i,j,a[i][j];
f>>n;
f>>k;
f.get();
for (i=1;i<=n;i++)
{
for (j=1;j<=n;j++)
{
a[i][j]<a[i][j+1];
if (j==k && a[i][j] %2==0)
g<<a[i][j];
}
for (i=1;i<=n;i++)
{
for (j=1;j<=n;j++)
g<<a[i][j];
g<<endl;
}
f.close();
g.close();
} 