cout<<"please enter your integer ";
cin>>n;
cout<<'please enter your real number";
cin>>x;

counter=1;
while(counter<=n)
{

i need help after plzzz

If r is in your equation, r needs to be in your program. Any starting bracket (like your while loop) needs to have an ending bracket. What do you need in your while loop? You are adding a series of terms, so you are going to be creating a term inside of the while loop, then adding it to some larger sum. That sum variable needs to be initialized. Should it be initialized before, inside, or after the while loop? What should it be initialized to? What variable in your problem is the sum variable?

I have to write aprogramme using loop structure ot calculate the follow formula r=1/x+1/2x+1/3x+........1/nx where user can input any interger for n and any real number for x . PLease thxxx

I have to write aprogramme using loop structure ot calculate the follow formula r=1/x+1/2x+1/3x+........1/nx where user can input any interger for n and any real number for x . PLease thxxx

We are helping you. We are bringing up questions that you need to ask yourself in order to solve the problem. The answers to these questions will guide you in how to code it.

Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...

Hi. so this is actually a continuation from another question of mineHere but i was advised to start a new thread as the original question was already answered.

This is the result of previous question answered :

I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...