{"id":26659,"date":"2022-02-01T18:13:27","date_gmt":"2022-02-01T18:13:27","guid":{"rendered":"https:\/\/www.testingdocs.com\/questions\/?p=26659"},"modified":"2025-05-17T06:07:15","modified_gmt":"2025-05-17T06:07:15","slug":"print-the-average-of-the-five-numbers-flowchart","status":"publish","type":"post","link":"https:\/\/www.testingdocs.com\/questions\/print-the-average-of-the-five-numbers-flowchart\/","title":{"rendered":"Print the average of the five numbers flowchart"},"content":{"rendered":"<h1>Print the average of the five numbers flowchart<\/h1>\n<h2>Question<\/h2>\n<p>Write a flowgorithm program that will take 5 numbers from the user using a loop and print the average of the five numbers<\/p>\n<h2>Answer<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-26662\" src=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Print-Average-of-Five-Numbers.png\" alt=\"Print Average of Five Numbers\" width=\"1898\" height=\"1025\" title=\"\" srcset=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Print-Average-of-Five-Numbers.png 1898w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Print-Average-of-Five-Numbers-300x162.png 300w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Print-Average-of-Five-Numbers-1024x553.png 1024w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Print-Average-of-Five-Numbers-768x415.png 768w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Print-Average-of-Five-Numbers-1536x830.png 1536w\" sizes=\"auto, (max-width: 1898px) 100vw, 1898px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Create\/Declare variables: Follow the instructions to <a title=\"https:\/\/www.testingdocs.com\/create-variables-in-flowgorithm-flowchart\/\" href=\"https:\/\/www.testingdocs.com\/create-variables-in-flowgorithm-flowchart\/\">create variables in the flowchart<\/a>.<\/p>\n<ul>\n<li>num<\/li>\n<li>i<\/li>\n<li>sum<\/li>\n<li>average<\/li>\n<\/ul>\n<p>num: to store the user input number.<\/p>\n<p>i : i variable is the loop counter. To track how many times the for loop should run. You need to run the loop five times to take five numbers.<\/p>\n<p>sum: The sum variable is used to accumulate the sum of the five numbers.<\/p>\n<p>average: to store the average of the numbers.<\/p>\n<p>Add a<a title=\"https:\/\/www.testingdocs.com\/for-loop-statement-in-flowgorithm\/\" href=\"https:\/\/www.testingdocs.com\/for-loop-statement-in-flowgorithm\/\"><strong> For<\/strong> loop<\/a> symbol to the flowchart.<\/p>\n<p>Inside the loop take the user input number using the <a title=\"https:\/\/www.testingdocs.com\/flowgorithm-input-statement\/\" href=\"https:\/\/www.testingdocs.com\/flowgorithm-input-statement\/\"><strong>Input<\/strong> shape<\/a>.<\/p>\n<p>Accumulate the sum of the number.<\/p>\n<p><strong>sum = sum + num<\/strong><\/p>\n<p>The value of the variable &#8220;<strong>sum&#8221;<\/strong> is fetched and the user input number\u00a0<strong> &#8220;num&#8221;<\/strong> is added.\u00a0 The result is stored in the <strong>sum<\/strong> variable.<\/p>\n<p>After the for loop, compute the average.<\/p>\n<p><strong>average = sum \/ 5\u00a0<\/strong><\/p>\n<p>The value of sum \/ 5 is stored in the average variable.<\/p>\n<p>Display the average using the <a title=\"https:\/\/www.testingdocs.com\/flowgorithm-output-statement\/\" href=\"https:\/\/www.testingdocs.com\/flowgorithm-output-statement\/\">Output symbol<\/a>.<\/p>\n<h2>Sample Output<\/h2>\n<p>Test the flowchart so that it displays the correct output.<\/p>\n<p>The sample output is shown below:<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-26666\" src=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Average-of-Five-Numbers-Output.png\" alt=\"Average of Five Numbers Output\" width=\"1920\" height=\"1052\" title=\"\" srcset=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Average-of-Five-Numbers-Output.png 1920w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Average-of-Five-Numbers-Output-300x164.png 300w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Average-of-Five-Numbers-Output-1024x561.png 1024w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Average-of-Five-Numbers-Output-768x421.png 768w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Average-of-Five-Numbers-Output-1536x842.png 1536w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>That&#8217;s it. Save the flowchart.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Print the average of the five numbers flowchart Question Write a flowgorithm program that will take 5 numbers from the user using a loop and print the average of the five numbers Answer &nbsp; Create\/Declare variables: Follow the instructions to create variables in the flowchart. num i sum average num: to store the user input [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[847],"tags":[],"class_list":["post-26659","post","type-post","status-publish","format-standard","hentry","category-flowgorithm-questions","has-post-title","has-post-date","has-post-category","has-post-tag","has-post-comment","has-post-author",""],"_links":{"self":[{"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/posts\/26659","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/comments?post=26659"}],"version-history":[{"count":10,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/posts\/26659\/revisions"}],"predecessor-version":[{"id":27384,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/posts\/26659\/revisions\/27384"}],"wp:attachment":[{"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/media?parent=26659"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/categories?post=26659"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/tags?post=26659"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}