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
nlexa [21]
3 years ago
7

Write a program in C to: a) Calculate Sn=1+1.2+1.2.3+…+1.2.3…n , n>0

Computers and Technology
1 answer:
mezya [45]3 years ago
4 0

Answer:

// Program in C to calculate sum of 1+1.2+.....+1.2.3...n

// include header

#include <stdio.h>

// main function

int main()

{

   // variable Declaration and initialization

   int n,a,prod=1,sum=0;

   // ask to enter the value of n

   printf("enter the value of n:");

   // read the value of n

   scanf("%d",&n);

   for(a=1;a<=n;a++)

   {

       // calculate product

       prod=prod*a;

       // calculate sum of the series

       sum=sum+prod;

   }

   // print the sum

   printf("sum of the series is:%d",sum);

   return 0;

}

Explanation:

Read the value of n from user.initialize variables "prod=1" and

"sum=0".Iterate over a for loop to calculate product term as "prod=prod*a".Here prod will have product of all till "a-1" for each "a".Then "a" is multiplied with "prod" and then add to sum.After the loop ends, "sum" will have the total of all the terms.

Output:

enter the value of n:5

sum of the series is:153

You might be interested in
I need help with this​
Elodia [21]
The answer is number 2.
8 0
4 years ago
You have important data on your hard drive that is not backed up and your Windows installation is so corrupted you know that you
love history [14]

Answer:

Make every attempt to recover the data

Explanation:

If your decide to format the drive, use system restore or reinstall the windows OS you may end up loosing all your data so the best option is to try as much as you can attempting to recover the data because the data might or definitely will be lost while using other options you think are available.

8 0
3 years ago
Draw a Hierarchical input process output ( HIPO ) chart to represent a high - level view of the functions of the proposed system
Morgarella [4.7K]

The format to use in drawing the Hierarchical input process output  chart to show a high - level view of the functions of the proposed system is given in the image attached.

<h3>What is hierarchical input process output?</h3>

An HIPO model is known to be a form of hierarchical input process output model that helps in  systems analysis design and also in documentation .

Note that it is often used for depicting the modules of a system based on the use of hierarchy and for saving each module and thus by following the method used in the image attached, one can draw a Hierarchical input process output ( HIPO ) chart to represent a high - level view of the functions of the proposed system.​

Learn more about HIPO  from

brainly.com/question/2665138

#SPJ1

5 0
2 years ago
Angular when to use reactiveformsmodule.
WITCHER [35]

Answer:

Image result for Angular when to use reactiveformsmodule.

In summaries, if forms are very important for your app, or reactive pattern are used in your app, you should use reactive forms. Otherwise your app have basic and simple requirement for forms such as sign in, you should use template-driven forms

Explanation:

Each form has a state that can be updated by many different interactions and its up to the application developer to manage that state and prevent it from getting corrupted. This can get hard to do for very large forms and can introduce a category of potential bugs

3 0
2 years ago
Question #1
Evgen [1.6K]

Answer:

Pseudocode and flowchart.

Explanation:

I just got it correct.

8 0
3 years ago
Other questions:
  • Write a function called ReverseLetters that takes an input phrase consisting of a single word and reverses the sequence of lette
    15·1 answer
  • The process of converting information, such as text, numbers, photos, or music, into digital data that can be manipulated by ele
    7·1 answer
  • Which business filing process puts documents or data in the order by date? a. Linear
    7·1 answer
  • Write a program that will askthe user to enter the amount of a purchase. The program should thencompute the state and county sal
    5·1 answer
  • Linda has written a program that works well on various operating systems, but she needs to increase the readability of the progr
    14·1 answer
  • What is the term for a Web site that allows users to access and interact with software from any Internet-connected computer or d
    11·1 answer
  • What are hardware and software?<br><br><br><br> WILL MARK BRAINIEST
    9·2 answers
  • POINT BOOST:
    12·1 answer
  • From the time users first visit a new website, or view a new media piece, how much time will they spend on the site before they
    10·1 answer
  • What are the two protocols used most often with iot devices? (select two. )
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!