Computer Science, asked by WHATDAHECK, 4 months ago

Write a program in QBASIC and draw a flowchart

to find the sum of the following series :

S = 1 +2^2 + 3^3 ……………. N​

Answers

Answered by Anonymous
71

Answer:

Avian Influenza in poultry birds confirmed in 9 states so far: Govt


sainiinswag: Wrong answer!
Answered by allysia
109

Language:

Qbasic

Flowchart:

Consider the attachment.

Program:

CLS

INPUT "enter the value of n:";n

sum=0

FOR i = 1 TO n

sum=sum+ i^i

NEXT i

PRINT sum

END

Output:

Please consider the attachment.

Explanation:

  • Line 1: Clears the screen.
  • Line 2: Takes input and saves it in n.
  • Line 3: Initializes sum.
  • Line 4: Starts a loop from 1 to n.
  • Line 5: Increases value of sum by i^i where i is the number of times the loop ran.
  • Line 7: Prints final value of sum.
  • Line 8: Ends the program.

Attachments:

Anonymous: nice...!
erajireddy6: Fabulous!!!
sainiinswag: Great answer
Anonymous: keep up the good work :D
QueenOfStars: Good one Vincent! :D
allysia: tqsm humans.
Similar questions