Computer Science, asked by srishti2131, 9 months ago


Write algorithm to input N numbers and print the largest number from it and draw flowchart ​

Answers

Answered by mad210203
5

Algorithm and flowchart are given below.

Explanation:

  • An algorithm is a step-by-step method or instruction to solve a problem. The basis of writing a program is created by them.

Steps for algorithm to input N numbers and print largest number:

  1. Start
  2. Declare i, a[10],n,max
  3. Read n (Number of numbers)
  4. Read the numbers and store them in a array

       for(i=0;i<n;i++)

       scanf("%d",&a[i]);

   5. max=a[0];

   6. for(i=0;i<n;i++)

       if(max<a[i])

       max=a[i];

   7. Print max

   8. Stop

Refer the attached image for the flowchart.

Attachments:
Similar questions