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
What is the name of the interface that uses graphics as compared to a command-driven interface?
bonufazy [111]
Answer = GUI (Graphical User Interface)
4 0
3 years ago
Why a management-focused program provides a more appropriate learning path for you than a program based heavily on technical con
AlekseyPX
The program makes more money
3 0
3 years ago
A slide ____ is a special effect used to progress from one slide to the next slide in a slide show.
marusya05 [52]
Transition, transition are mainly used is videos, moves, and powerpoint, they use spatial effects and are smooth with different colors, paths, or sounds. 
8 0
3 years ago
Read 2 more answers
1. Write programming code in C++ for school-based grading system. The program should accept the Subject and the number of studen
satela [25.4K]

In this program, I am using the school-based grading system and the program should accept the subject and the number of students.

Program approach:-

  • Using the necessary header file.
  • Using the standard I/O namespace function.
  • Define the main function.
  • Declare the variable.
  • Display enter obtain marks in 5 subjects.
  • Return the value.

Program:-

//header file

#include<iostream>

//using namespace

using namespace std;

//main method

int main()

{

//declare variable

  int j;

  float mark, sum=0, a;

//display enter obtain marks in 5 subjects

  cout<<"Enter Marks obtained in 5 Subjects: ";

  for(j=0; j<5; j++)

  {

      cin>>mark;

      sum = sum+mark;

  }

  a = sum/5;

//display grade

  cout<<"\nGrade = ";

  if(a>=91 && a<=100)

//display a1

      cout<<"a1";

  else if(a>=81 && a<91)

//display a2

      cout<<"a2";

  else if(a>=71 && a<81)

      cout<<"b1";

  else if(a>=61 && a<71)

      cout<<"b2";

  else if(a>=51 && a<61)

//display c1

      cout<<"c1";

  else if(a>=41 && a<51)

//display c2

      cout<<"c2";

  else if(a>=33 && a<41)

//display d

      cout<<"d";

  else if(a>=21 && a<33)

//display e1

      cout<<"e1";

  else if(a>=0 && a<21)

//display e2

      cout<<"e2";

  else

//display invalid

      cout<<"Invalid!";

  cout<<endl;

//return the value

  return 0;

}

Learn more grading system

brainly.com/question/24298916

7 0
2 years ago
Most _____ focus on galning entry over the internet to a secure computer system by finding a
dangina [55]

Most <u>Malware</u>  focus on gaining entry over the internet to a secure computer system by finding a  working user ID and password combination.

<u>Explanation:</u>

A malware is a small computer program which works on the user’s system without knowing to the user. Different malware works differently.

Some malware sits on the user computer, create multiple unnecessary files and make the hard drive full, some people create viruses to show their computer skills which they tend to prove in a wrong way, some malware sits in the computer to steal data especially while using internet.

So there are malware's like Virus, Worm, Trojan, spyware, etc.

5 0
3 years ago
Other questions:
  • A popular use of cd-rw and cd-r discs is to create audio cds. what is the process of copying audio and/or video data from a purc
    11·1 answer
  • A router is a device that addresses a packet on a network to the next router along the line. Under which layer of the OSI model
    5·1 answer
  • Which of the following is not a type of user account? A. Administrator b. Guest c. Group d. Standard
    10·1 answer
  • A resistor bank is connected to a controller with conductor insulation rated 75 °C. The resistors are not used in conjunction wi
    15·1 answer
  • An algorithm is defined as a well-ordered collection of unambiguous and effectively computable operations that when executed pro
    10·1 answer
  • Harold included an excerpt from an Internet magazine in an article he wrote for the school newspaper. However, he did not ask pe
    13·2 answers
  • What technology did one of the student's have to learn to use in order to help him with his homework in the film, "Disconnected:
    11·2 answers
  • If a filesystem has a block size of 4096 bytes, this means that a file comprised of only one byte will still use 4096 bytes of s
    12·1 answer
  • The find_item functions uses binary search to recursively locate an item is the list, returning true if found, false otherwise.
    13·1 answer
  • Many phone fraud scammers are expessily cunning because they approach the target to try to sell
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!