Cod sursa(job #2031219)

Utilizator AndonePresedinteAndone Alexandru AndonePresedinte Data 2 octombrie 2017 21:03:51
Problema Tablete Scor 10
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.42 kb
#include <iostream>
#include <fstream>
using namespace std;
ifstream f("tablete.in");
ofstream g("tablete.out");
int n, k;
int a[1000][1000];
void caz1()
{
    int x=0;
    for(int i=0; i<n; i++)
    {
        for(int j=0; j<n; j++)
        {
            x++;
            g<<x<<' ';
        }
        g<<endl;
    }
}
int main()
{
    f>>n>>k;
    if(n%2==0 && k%2==0) caz1();



    return 0;
}