Cod sursa(job #500772)
| Utilizator | Data | 13 noiembrie 2010 01:54:19 | |
|---|---|---|---|
| Problema | Cifra | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.2 kb |
#include<iostream.h>
#include<conio.h>
#include<math.h>
main ()
{
int s=0,T,x;
cin>>T;
for (int i=1;i<=T;i++)
{
x=pow(i,i);
cout<<(x+s)%10<<" ";
s+=pow(i,i);
}
getch ();
}
