Cod sursa(job #77152)

Utilizator tot_zeuIulean Sebi tot_zeu Data 13 august 2007 14:45:35
Problema Cifra Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.3 kb
#include <fstream>
using namespace std;
int main()
{ ifstream fi("cifra.in");
  ofstream fo("cifra.out");
  int t,i,n,k;
  n=0;
  fi >> t;
  k=1;
  while (k==t)
  {
for (i=1; i<k; i++)
{    n = n + (n*n);
  fo << n;
  k++;
} 
}
fi.close();
fo.close();
return 0;
}