Advertisements
Write a program to display the terms and sum of the following series: 1+4+7+10+13+16+ 19 +22
#include <iostream>
using namespace std;
int main() {
cout << "1 + 4 + 7 + 10 + 13 + 16 + 19 + 22 = " << 1 + 4 + 7 + 10 + 13 + 16 + 19 + 22 << endl;
return 0;
}
Advertisements
0 Comments