write a program to compute the following sum? (C++program only?)
Solution
#include <iostream>using namespace std;int main(){ int sum = 0; for(int i = 1;i<=20;i++){ sum += (i*i*i); } cout<<“Sum = “<<sum<<endl; return 0;}
Sum44100 Process exited after 0.8275 seconds with returnvalue 0 Press any key to continue –
OR
OR