#include int main() { int N,u,i=0,v,w; cout<<"Tapez la valeur de N : ";cin>>N; u=3; v=2; if(N==0)w=u; else if(N==1)w=v; else for(i=2;i<=N;i++){w=i*v+(i+1)*u+i;u=v;v=w;} cout<<"u("<<N<<")="<<w<<endl; return 0; }
- Monday
- December 23rd, 2024
- Ajouter un cours