#include using namespace std; int main() { int N; double somme; cout << "Entrer un entier : "; cin >> N; if (N>=5) { for (int i=5; i<=N; i++) somme += i*i*i; } cout << "Somme des cubes de 5^3 a " << N << "^3 = " << somme << endl; cin.ignore(); cin.get(); return EXIT_SUCCESS; }
- Monday
- December 23rd, 2024
- Ajouter un cours