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
asambeis [7]
3 years ago
9

Write a function file that accepts the values of r, a and n as arguments and uses a for loop to return the sum of the first n te

rms of the geometric series. test your function for a = 3, r = 1/2 and n = 10.
Computers and Technology
1 answer:
Murrr4er [49]3 years ago
7 0

Given, a = 3, r = 1/2, n = 10

%r is common ratio

%n is number of terms

%a is the first term of the series

Sum = 0;

a = 3;

r = 1/2;

for i = 0 : 1 :  10;

Sum = Sum + a * r ^ i;

end

Sum


You might be interested in
Create a file account.cpp containing a Bank Account Class.
Daniel [21]

Answer:

#include <iostream>

using namespace std;

class BankAccount {

  string name = name;

  double balance = balance;

  BankAccount( string name, double balance ) {

    string name = name;

    double balance = balance;

     return 0;

  }

  string getName( ){

     return name;

  }

  double getbalance( ) {

     return balance;

  void setName( string username){

     name = username;

  }

  void setbalance( double newBalance){

     balance = newBalance;

  }

int main( ) {

  BankAccount user1(John, 0.0);

  BankAccount user2(Jane, 0.0);

  user1.setbalance( 2300.00)

  user2.setbalance( 4300.00)

  cout << user1.getname() << user1.getbalance();

  cout << user1.getname() << user1.getbalance();

}

Explanation:

The C source code above using a class to create a data structure of a bank account user name and balance. The attribute name and balance are private to the class and can be retrieved and modified through the get and set methods.

3 0
2 years ago
Express 0.0005 x 10-4 farads as picofarads
prohojiy [21]
0.0005 x 10⁻⁴ Farad = 0.000 000 05 Farad.
1 pF = 0.000 000 000 001 Farad

Divide them and get 50000 pF.
3 0
2 years ago
Read 2 more answers
Why do we install doorbells in our house
Vinil7 [7]

Explanation:

It's placed near the door. When a visitor presses the button, the bell rings inside alerting you that someone is at the door.

6 0
2 years ago
Read 2 more answers
software that instructs the computer how to run applications and controls the display/keyboard is know as the___.
kakasveta [241]
The answer is the alu arithmetic logic unit.
8 0
3 years ago
On Windows computers, applications from Microsoft will not look and act the same as windows and menus from the operating system.
Andrej [43]

True.

Windows is an operating system built by Microsoft. Chrome and Android are operating systems built by Google. MacOS (Macbook pro etc) and iOS (iPhone, iPad, Apple Watch etc) are operating systems built by Apple.

Engineers build applications or apps for all of the above operating systems (OS). For example, Microsoft Word menus will look slightly different on Windows vs on a Mac. The underlying functionality maybe the same but the way it looks may have subtle differences.

Think of the OS as the foundation of a building. Once you have the foundation, you can build a house, a skyscraper, an office building etc depending on what you want to build.

6 0
2 years ago
Read 2 more answers
Other questions:
  • When one block is executed after another block in order from top to bottom, this is called ______ (see picture) Question 31 opti
    8·1 answer
  • From the Start screen, you can A. access recently opened Excel workbooks. B. create a document from a template. C. create new bl
    12·2 answers
  • In an advanced word processing program which type of image or graphic is available in a variety of formats and styles?
    12·2 answers
  • ________ symbol is used in the "Advanced" section of the time range picker to round down to nearest unit of specified time.
    8·1 answer
  • Kuta software infinite pre- algebra multiplying polynomial and a monomial find product answer key
    14·1 answer
  • Variables set equal to patterns are said to be:_______.
    7·1 answer
  • Company policies require that all network infrastructure devices send system level information to a centralized server. Which of
    6·1 answer
  • Lenovo's ThinkPad laptop computers is designed in the United States, the case, keyboard, and hard drive are made in Thailand; th
    14·1 answer
  • Given N lines of input, print the 3rd character from each line as a new line of output. It is guaranteed that each of the n line
    8·1 answer
  • Write a python statement that print the number 1000
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!