1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Kruka [31]
3 years ago
8

Write a function to sum the following series:

Computers and Technology
1 answer:
Phoenix [80]3 years ago
5 0

Answer:

<u>C program to find the sum of the series( 1/2 + 2/3 + ... + i/i+1)</u>

#include <stdio.h>

double m(int i);//function declaration  

//driver function

int main() {

int i;

printf("Enter number of item in the series-\n");//Taking input from user

scanf("%d",&i);

double a= m(i);//Calling function

printf("sum=%lf",a);

return 0;

}

double m(int i)//Defining function

{

double j,k;

double sum=0;

for(j=1;j<i+1;j++)//Loop for the sum

{

k=j+1;

sum=sum+(j/k);

}

return sum;

}

<u>Output:</u>

Enter number of item in the series-5

sum=3.550000

You might be interested in
Can you please help me?
DochEvi [55]

Answer:

  1. Pre-edited footage, usually direct from the camera.
  2. Process or result of selectively sequencing video and/or audio clips into a new video file.
4 0
3 years ago
Which of the following is not a data in python. float, integer, bool, str.​
Gekata [30.6K]

Answer:

the question is which of the following isn't a Data type

Explanation:

am I right with the correction?

7 0
3 years ago
19 dollar fortnite giftcard who wants it
yarga [219]

Answer:

not me

Explanation:

3 0
3 years ago
Read 2 more answers
How can you change the block input so that the sprite moves in the opposite direction?
kaheart [24]

Answer:

an event block

6 0
3 years ago
Which of the following is an easy steps to take to avoid ESSD well working on your computer?
Monica [59]

C.) Keep your body in contact with the metal area of the computer


Generally, you want to keep contact with something metallic with clear path-to-ground. For instance, painted metal can do the job, but not as efficiently.

There are other ways to go about avoiding ESD, but this is the best option given in your question.

7 0
4 years ago
Other questions:
  • To easily add an organizational chart to a document, users should select _____. SmartArt Text Boxes Shapes Clip Art
    8·2 answers
  • What determines the choice of a rocket for a mission?
    11·1 answer
  • The _________ check is a type of hardware control that involves adding a "1" or a "0" to the end of every 8 bit byte such that t
    11·1 answer
  • ____ is a programming language used to view and manipulate data that is stored in a database.
    6·1 answer
  • Edhesive 4.1 question 1
    9·1 answer
  • What do you call when a hacker users multiple guest computers to crack a password?
    11·1 answer
  • Select the correct answer from each drop-down menu. The following diagram shows four resistors. What is the effective resistance
    9·1 answer
  • 1. What are the process involved in data processing cycle?​
    11·1 answer
  • Your agile team only has one database developer. So the other developers finish their tasks and then wait for their work to be I
    6·1 answer
  • What is the difference between encoding and decoding?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!