Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

create a flowchart for the problem below START ASSUMPTIONS: X and Y can be any numbers. OUTPUT Please enter two numbers. Tomson INPUT XY TOTAL

create a flowchart for the problem below
image text in transcribed
image text in transcribed
START ASSUMPTIONS: X and Y can be any numbers. OUTPUT "Please enter two numbers." Tomson INPUT XY TOTAL = X+Y OUTPUT "The sum is: ", TOTAL STOP Figure 6-1 To become a more creative programmer, force yourself to consider alternative solutions - don't rely on your first approach. It may not be the best one. To help you consider an alternative approach for this trivial problem, assume the computer running this program is broken. The broken computer doesn't have the ability to add two arbitrary numbers together in a process. In other words, if X is 5 and Y is 3, it cannot perform the following process: TOTAL = X + Y Figure 6-2 The computer is only able to add 1 to a number or subtract 1 from a number. The computer can compute X + 1 or X - 1 or Y + 1 or Y - 1, but it can't possibly compute X+Y. Your task is to write a program that doesn't violate the above assumption. Be sure to state any other assumptions as necessary for your solution. By the way, you're not allowed to assume you must buy a new computer

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Instant Reference

Authors: Gruber, Martin Gruber

2nd Edition

0782125395, 9780782125399

More Books

Students also viewed these Databases questions