[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-697704-105":59,"doc-detail-697704-en":130,"doc-similar-697704":161},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","introduction-to-programming-in-c-algorithms-flowcharts-and-pseudocode","Introduction to Programming in C++ - Algorithms, Flowcharts and Pseudocode","","Introduction to Programming in C++ explains algorithms as the core logic behind computing, and shows how to document that logic using flowcharts and pseudocode. The material introduces common flowchart symbols, data flow via arrows, and the role of decisions using conditional tests. It provides worked examples for calculations such as interest, sums/averages/products, decreasing order comparisons, and decision-based branching. It also covers count loops, while/do loop structures, end-of-data testing, and the differences between pre-test and post-test loops.",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/introduction-to-programming-in-c-algorithms-flowcharts-and-pseudocode/697704/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/introduction-to-programming-in-c-algorithms-flowcharts-and-pseudocode/697704.png","ImageObject",300,407,{"name":92,"@type":93},"anakgang17","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-29","2026-11-12",true,{"@type":102,"interactionType":103,"userInteractionCount":19},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"What are algorithms and why are they important in computing?","Question",{"text":112,"@type":113},"Algorithms are sequences of instructions that define how to solve a problem. They are fundamental to computing and recur in many common processes.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"How do flowcharts and pseudocode help document program logic?",{"text":117,"@type":113},"Flowcharts represent essential algorithm steps with shapes and arrows for flow of data. Pseudocode describes the same essential steps without graphical symbols, using structured text and indentation.",{"name":119,"@type":110,"acceptedAnswer":120},"What is decision (switching) logic in a flowchart?",{"text":121,"@type":113},"Decision logic consists of a condition and a branch based on the result of testing that condition. The diamond symbol stores the question, and exit arrows are labeled for each possible answer.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},697704,1794442290,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":19,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":29,"language":139,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":140,"faqs":141,"seo_title":142,"seo_description":67,"update_tm":129,"read_time":143,"preview_page_count":19,"preview_urls":144},962090883568,"https://ap-avatar.wpscdn.com/davatar_a8503ba1806abce46bf441b54a3ca4cd","Introduction to Programming in C++: Algorithms, Flowcharts and Pseudocode  \nby Brent Daviduck  \nThe following material was developed by Brent Daviduck of the Computer Systems Technology program at Red Deer College in Alberta, Canada. For more information on the program and for other material, see: [http://cst.rdc.ab.ca/](http://cst.rdc.ab.ca/).  \nA sequence of instructions is called an algorithm. Algorithms are a fundamental part of computing. If you study computing for many years you will study algorithms of frequently used processes. Books have been written on algorithms for such common activities as storing and ordering data. As most problems you get are unique, you will develop your own algorithms. However, you may find standard algorithms for those parts of your programs that do common activities.  \nThere are two commonly used tools to help to document program logic (the algorithm) . These are flowcharts and Pseudocode. We will use both methods here. Generally, flowcharts work well for small problems but Pseudocode is used for larger problems. Some of the common symbols used in flowcharts are shown below:  \nWith flowcharting, essential steps of an algorithm are shown using the shapes above. The flow of data between steps is indicated by arrows, or flowlines. For example, a flowchart (and equivalent Pseudocode) to compute the interest on a loan is shown below:  \nFlowchart Pseudocode  \nRead NAME, BALANCE, RATE  \nCompute INTEREST as BALANCE x RATE Write (Display) NAME and INTEREST  \nNote that the Pseudocode also describes the essential steps to be taken, but without the graphical enhancements. Another example of a flowchart and the equivalent Pseudocode is shown below. In this case, the program computes the sum, average and product of three numbers:  \nFlowchart  \nPseudocode  \nRead X, Y, Z  \nCompute Sum (S) as X + Y + Z Compute Average (A) as S / 3  \nCompute Product (P) as X x Y x Z  \nWrite (Display) the Sum, Average and Product  \nDecisions (Switching logic)  \nSwitching logic consists of two components-a condition and a goto command depending on the result of the condition test. The computer can determine the truth value of a statement involving one of six mathematical relations symbolized in the table below:  \n== Equals  \n!= Not Equal  \n\u003C Less than  \n\u003C= Less than or equal to  \n> Greater than  \n>= Greater than or equal to  \nIn practice, the computer is presented not with a true/false statement, but with a question having a \"Yes\" or \"No\" answer, for example if A = 10, B = 20, K = 5, and SALES = 10000, then:  \nIs A == B?  \nIs B > A?  \nIs K \u003C= 25? Is SALES >= $5000 .00?  \nNo  \nYes  \nYes  \nYes  \nWith each question, the computer can be programmed to take a different course of action depending on the answer. A step in an algorithm that leads to more than one possible continuation is called a decision.  \nIn flowcharting, the diamond-shaped symbol is used to indicate a decision. The question is placed inside the symbol, and each alternative answer to the question is used to label the exit arrow which leads to the appropriate next step of the algorithm. The decision symbol is the only symbol that may have more than one exit.  \nThe example below shows the flowchart for a program that reads two numbers and displays the numbers read in decreasing order:  \nThe equivalent Pseudocode is shown below. Note that with Pseudocode, indentation is used to show the various steps that apply to a decision:  \nRead A, B  \nIf A is less than B  \nBIG = B  \nSMALL = A else  \nBIG = A  \nSMALL = B  \nWrite (Display) BIG, SMALL  \nLoops  \nMost programs involve repeating a series of instructions over and over until some event occurs. For example, if we wish to read ten numbers and compute the average, we need a loop to count the number of numbers we have read.  \nCount loops are loops where the program must count the number of times operations are completed. The flowchart below illustrates a loop that counts from 1 to 10:  \nCount loop flowchart  \nThe flowchart show","cbCaibnyPOYzZnLD","https://ap.wps.com/l/cbCaibnyPOYzZnLD","pdf",37766,"English","# Introduction to Programming\n## Algorithms and Program Logic\n## Flowcharts vs Pseudocode\n## Flowchart Symbols and Data Flow\n## Decisions (Switching Logic)\n## Loops: Count, While, and Do-While\n## End-of-Data and Pre-/Post-Test Loops","[{\"question\":\"What are algorithms and why are they important in computing?\",\"answer\":\"Algorithms are sequences of instructions that define how to solve a problem. They are fundamental to computing and recur in many common processes.\"},{\"question\":\"How do flowcharts and pseudocode help document program logic?\",\"answer\":\"Flowcharts represent essential algorithm steps with shapes and arrows for flow of data. Pseudocode describes the same essential steps without graphical symbols, using structured text and indentation.\"},{\"question\":\"What is decision (switching) logic in a flowchart?\",\"answer\":\"Decision logic consists of a condition and a branch based on the result of testing that condition. The diamond symbol stores the question, and exit arrows are labeled for each possible answer.\"}]","Introduction to Programming in C++ - Algorithms, Flowcharts and Pseudocode | PDF",15,[145,149,153,157],{"page_no":8,"url":146,"width":147,"height":148},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/3b097b5be906f8b55ee32bee6ea230b4.webp",983,1272,{"page_no":14,"url":150,"width":151,"height":152},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/5bd02cfe5c5c0f7a4244119f66318bda.webp",982,1270,{"page_no":81,"url":154,"width":155,"height":156},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/370ec6930451ef5e5ce75ca9e565efe5.webp",981,1269,{"page_no":19,"url":158,"width":159,"height":160},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/3cefd39d4b4b96fdf62670a07b26aa74.webp",980,1268,{"list":162,"token":66},[163,169,175,181,187,193,199,205,211,217],{"doc_id":164,"doc_title":165,"file_type":137,"home_preview_img_url":166,"slug":167,"view_count":81,"category_name":30,"create_tm":168},697706,"Algorithm - Flowchart - Pseudocode","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230009856873/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111699&Signature=u1GlZmbatVZ5dg%2B0SjM1QEEZuDs%3D","algorithm-flowchart-pseudocode",1794442309,{"doc_id":170,"doc_title":171,"file_type":137,"home_preview_img_url":172,"slug":173,"view_count":34,"category_name":30,"create_tm":174},668967,"Pseudocode and Flowcharts - An Educational Handout","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229987435530/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111699&Signature=vcZgzHAwOd1mBiaIVqctX9rCvCU%3D","pseudocode-and-flowcharts-an-educational-handout",1793521900,{"doc_id":176,"doc_title":177,"file_type":137,"home_preview_img_url":178,"slug":179,"view_count":19,"category_name":30,"create_tm":180},673425,"Pseudocode & Flow Charts - read online free","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229990822783/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111699&Signature=%2FLGLztEAtQ5cAQTd7DYhBrQDb0c%3D","pseudocode-flow-charts-read-online-free",1793637913,{"doc_id":182,"doc_title":183,"file_type":137,"home_preview_img_url":184,"slug":185,"view_count":24,"category_name":30,"create_tm":186},680207,"Flowcharts - Programming Fundamentals","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229997987812/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111699&Signature=UzK5hm97r1w7gcy4LbTTtSH52F4%3D","flowcharts-programming-fundamentals",1793914768,{"doc_id":188,"doc_title":189,"file_type":137,"home_preview_img_url":190,"slug":191,"view_count":19,"category_name":30,"create_tm":192},680209,"Flowchart","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229997721854/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111699&Signature=5rE269SyUNTsWWHTY9O%2Bz3ECJeY%3D","flowchart-680209",1793914775,{"doc_id":194,"doc_title":195,"file_type":137,"home_preview_img_url":196,"slug":197,"view_count":143,"category_name":30,"create_tm":198},403651,"Week 1 - Programming Fundamentals - Basics & Conditionals","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229920231890/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111699&Signature=Cz5NQayyjFh6ESc9yXKedRRi2%2Fg%3D","week-1-programming-fundamentals-basics-conditionals",1790542223,{"doc_id":200,"doc_title":201,"file_type":137,"home_preview_img_url":202,"slug":203,"view_count":19,"category_name":30,"create_tm":204},697705,"Flowchart Definition and Its Symbols - Study Notes","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230009856835/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111699&Signature=06wSqFry2YRdYmqcZMKXAIDu54s%3D","flowchart-definition-and-its-symbols-study-notes",1794442296,{"doc_id":206,"doc_title":207,"file_type":137,"home_preview_img_url":208,"slug":209,"view_count":44,"category_name":30,"create_tm":210},657280,"COEN-4720 Embedded Systems Design - Lecture 2 - Flowcharts, Algorithmic State Machines","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975408543/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111699&Signature=fLErfD6NjUmZkwWXsQdWxyF%2F1v4%3D","coen-4720-embedded-systems-design-lecture-2-flowcharts-algorithmic-state-machines",1792976871,{"doc_id":212,"doc_title":213,"file_type":137,"home_preview_img_url":214,"slug":215,"view_count":14,"category_name":30,"create_tm":216},701647,"UNIT: 1 - Flowchart and Algorithm","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230012473631/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111699&Signature=cdV5mrTdFESwi%2Ba9hTQ9RcalyEI%3D","unit-1-flowchart-and-algorithm",1794535499,{"doc_id":218,"doc_title":219,"file_type":137,"home_preview_img_url":220,"slug":221,"view_count":14,"category_name":30,"create_tm":222},718167,"JAVA PROGRAMS - Java Practice - number patterns and arithmetic tasks","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230019204730/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111699&Signature=s%2B08LtsG2II4tQLstbdOw7aXCx4%3D","java-programs-java-practice-number-patterns-and-arithmetic-tasks",1794855123]