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]
2 years ago
8

Write a function to sum the following series:

Computers and Technology
1 answer:
Phoenix [80]2 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
To create a datetime object for the current date and time, you can use theGroup of answer choicestoday() method of the date clas
SVEN [57.7K]

var theDate = new DateTime (DateTime.Today.Year, DateTime.Today.Month, DateTime.Today.Day, hours, minute, second);

6 0
2 years ago
The purpose of this assignment is to determine a set of test cases knowing only the function’s specifications, reported hereaf
Nesterboy [21]

Answer:

The program is written using PYTHON SCRIPT below;

N=int(input(" Enter number of Rows you want:"))

M=[] # this for storing the matrix

for i in range(N):

l=list(map(int,input("Enter the "+str(i+1)+" Row :").split()))

M.append(l)

print("The 2D Matrix is:\n")

for i in range(N):

print(end="\t")

print(M[i])

W=[] # to store the first non zero elemnt index

T=[] # to store that value is positive or negative

L=len(M[0])

for i in range(N):

for j in range(L):

if (M[i][j]==0):

continue

else:

W.append(j) # If the value is non zero append that postion to position list(W)

if(M[i][j]>0): #For checking it is positive or negative

T.append(+1)

else:

T.append(-1)

break

print()

print("The first Non Zero element List [W] : ",end="")

print(W)

print("Positive or Negative List [T] : ",end="")

print(T)

Explanation:

In order for the program to determine a set of test cases it takes in input of 2D matrix in an N numbet of rows.

It goes ahead to program and find the column index of the first non-zero value for each row in the matrix A, and also determines if that non-zero value is positive or negative. The If - Else conditions are met accordingly in running the program.

5 0
2 years ago
Yes, because it allows many users to get together and work to help project their services.
gregori [183]
Whats the question lmaoooooooooooooooooooooo
7 0
3 years ago
A data visualization tool that updates in real time and gives multiple outputs is called
strojnjashka [21]

Answer:

A data dashboard

Explanation:

3 0
2 years ago
Consider five wireless stations, A, B, C, D, and E.
klio [65]

Answer:

Check the explanation

Explanation:

A) Whenever C is sending to D, what other communications are possible?

C’s packet will be seen by A, B and D, but not by E. Thus, D can send to E at the sametime..

B) Whenever B is sending to A, what other communications are likely?

Even though B’s packet will not be seen by D, other nodes, e.g., E, or C, can’t send to D since the packets from these nodes will interfere with the packets from B at A. Therefore, other communications is not likely at the same time.

C) Whenever B is sending to C, what other communications are possible?

B’s packet will be seen by E, A and C, by not by D. therefore, E can send to D at the same point.

4 0
2 years ago
Other questions:
  • What is the other name for repetitive strain injury
    12·2 answers
  • Checking tire pressure should be performed:
    11·2 answers
  • Pls help! ive been looking everywhere online but I couldn't find the answer to this:
    5·1 answer
  • A _____ is a harmful program that resides in the active memory of a computer and duplicates itself. Select one: a. scareware b.
    7·1 answer
  • Which K-Drama was made in 2009?
    5·2 answers
  • Do you think people accept poor quality in information technology projects and products in exchange for faster innovation? What
    5·1 answer
  • Use Spreadsheet Functions and Formulas
    6·1 answer
  • 5. Write the name of the tab, command group, and icon you need to use to access the
    11·2 answers
  • Types of computer viruses<br>​
    5·2 answers
  • Many large companies use the word(s), _____, to refer to the huge network of computers that meets their diverse computing needs.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!