Today, we will quickly review CS101.
#include<iostream>
using namespace std;
int main() {
int i,n;
cout <<"Type an ending number which is greater than 1:";;
//
//
//
//
return 0;
}
$$ g(n)=1^2+2^2+3^2+\ldots+n^2 $$ using the recursion. Assume \(n\geq1\).
#include<iostream>
using namespace std;
int g(int n) {
//
//
// Complete.
//
//
}
#include<iostream>
using namespace std;
int g(int n) {
//
//
// Complete.
//
//
return 0;
}
#include<iostream>
using namespace std;
int main() {
int n=0;
cout<<"Type the number of items:";
cin>>n;
//
//
//
//
//
return 0;
}