#include <iostream>
using namespace std;
int main ()
{
int i = 1;
double sum = 0;
do
sum = sum + (1/i) + 18 * i;
i++;
} while (i<=15);
cout<<sum;
}
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
#include <iostream>
using namespace std;
int main ()
{
int i = 1;
double sum = 0;
do
{
sum = sum + (1/i) + 18 * i;
i++;
} while (i<=15);
cout<<sum;
}