{"id":4596,"date":"2018-10-06T09:36:15","date_gmt":"2018-10-06T09:36:15","guid":{"rendered":"https:\/\/www.testingdocs.com\/questions\/?p=4596"},"modified":"2024-08-09T08:13:49","modified_gmt":"2024-08-09T08:13:49","slug":"design-a-flowchart-that-finds-and-display-the-larger-of-the-two-numbers","status":"publish","type":"post","link":"https:\/\/www.testingdocs.com\/questions\/design-a-flowchart-that-finds-and-display-the-larger-of-the-two-numbers\/","title":{"rendered":"Flowchart that finds the larger of the two numbers"},"content":{"rendered":"<h2>Problem<\/h2>\n<p>Design a flowchart that finds and displays the larger of the two numbers provided by the user. Let&#8217;s assume the numbers are x and y. The flowchart prompts the user for the values x and y.<\/p>\n<h3>IPO chart<\/h3>\n<p>Consider modeling an IPO chart for the flowchart before the flowchart design. Think about the input to the flowchart, processing statements, and the output of the flowchart. IPO chart is a handy tool to visualize in a tabular format.<\/p>\n<p>&nbsp;<\/p>\n<table border=\"1\" width=\"539\" cellspacing=\"1\" cellpadding=\"1\">\n<tbody>\n<tr>\n<td style=\"background-color: #efefef;\"><strong>Input<\/strong><\/td>\n<td style=\"background-color: #efefef;\"><strong>Process <\/strong><\/td>\n<td style=\"background-color: #efefef;\"><strong>Output <\/strong><\/td>\n<\/tr>\n<tr>\n<td>Input to the flowchart.<\/td>\n<td>Computations that are done in the flowchart.<\/td>\n<td>Output displayed by the flowchart<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Pseudocode<\/h3>\n<pre>START\r\nDECLARE x,y\r\n\r\nINPUT x\r\nINPUT y\r\nIF x != y THEN\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 IF x &gt; y THEN\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 DISPLAY \"The larger of the two numbers \" + x + \" \r\n             and \" + y + \" is \" + x\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ELSE\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 DISPLAY \"The larger of the two numbers \" + x + \" \r\n             and \" + y + \" is \" + y\r\nEND IF\r\nELSE\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 DISPLAY \"Both the numbers are equal\"\r\nEND IF\r\nEND<\/pre>\n<h3>Flowchart<\/h3>\n<p>We will prompt the user to enter two numbers x and y.<\/p>\n<p>We will check if the numbers are equal. If not then we will check for larger of the two numbers.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-4603 size-full\" title=\"Design a flowchart\" src=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Larger-of-x-and-y.png\" alt=\"Design a flowchart\" width=\"1920\" height=\"1010\" srcset=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Larger-of-x-and-y.png 1920w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Larger-of-x-and-y-300x158.png 300w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Larger-of-x-and-y-1024x539.png 1024w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Larger-of-x-and-y-768x404.png 768w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Larger-of-x-and-y-1536x808.png 1536w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/p>\n<h3>Sample Output<\/h3>\n<p>Let&#8217;s run the flowchart with sample test cases to verify that it&#8217;s working as intended. If you find that the flowchart is not working as intended in the testing, we may need to verify and debug the flowchart.<\/p>\n<p>Debugging a flowchart: <strong><a href=\"https:\/\/www.testingdocs.com\/debugging-a-raptor-flowchart\/\">https:\/\/www.testingdocs.com\/debugging-a-raptor-flowchart\/<\/a><\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4601\" src=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Larger-of-Two-Numbers.png\" alt=\"Larger of Two Numbers\" width=\"1919\" height=\"996\" title=\"\" srcset=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Larger-of-Two-Numbers.png 1919w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Larger-of-Two-Numbers-300x156.png 300w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Larger-of-Two-Numbers-1024x531.png 1024w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Larger-of-Two-Numbers-768x399.png 768w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Larger-of-Two-Numbers-1536x797.png 1536w\" sizes=\"auto, (max-width: 1919px) 100vw, 1919px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>The larger of the two numbers 7 and 17 is 17<br \/>\n&#8212;-Run complete. 9 symbols evaluated.&#8212;-<br \/>\nBoth the numbers are equal<br \/>\n&#8212;-Run complete. 8 symbols evaluated.&#8212;-<br \/>\nThe larger of the two numbers 89 and 73 is 89<br \/>\n&#8212;-Run complete. 9 symbols<\/p>\n<p>&nbsp;<\/p>\n<p>Raptor Tutorials on this website can be found at:<\/p>\n<p><a href=\"https:\/\/www.testingdocs.com\/raptor-a-flowchart-tool\/\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>https:\/\/www.testingdocs.com\/raptor-a-flowchart-tool\/<\/strong><\/a><\/p>\n<p>RAPTOR official website: <a href=\"https:\/\/raptor.martincarlisle.com\/\" rel=\"noopener\"><strong>https:\/\/raptor.martincarlisle.com\/<\/strong><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Problem Design a flowchart that finds and displays the larger of the two numbers provided by the user. Let&#8217;s assume the numbers are x and y. The flowchart prompts the user for the values x and y. IPO chart Consider modeling an IPO chart for the flowchart before the flowchart design. Think about the input [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[187],"tags":[19],"class_list":["post-4596","post","type-post","status-publish","format-standard","hentry","category-flowchart","tag-raptor","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\/4596","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=4596"}],"version-history":[{"count":16,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/posts\/4596\/revisions"}],"predecessor-version":[{"id":23763,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/posts\/4596\/revisions\/23763"}],"wp:attachment":[{"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/media?parent=4596"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/categories?post=4596"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/tags?post=4596"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}