<u>Explanation:</u>
Remember, an algorithm in simple words means a set of instructions or steps to be followed in other to solve a problem.
Note, to decide which commute is cheaper, it means the output of the algorithm should be the cheaper way to commute.
Using pseudocode do the following;
- determine the inputs and outputs of the problem
- arrange the identified problem into micro-tasks
- describe each micro-tasks in the pseudocode
- Test the pseudocode by solving the problem.
If user output is ''red purble yellow exit'': red purple yellow import java.util.Scanner; import java. io.PrintWriter; import java. io.StringWriter; public class StringStreamOutput { public static void main (String [] args) { Scanner snr = new Scanner(Scanner.in); Stringuseritem = ''''; StringWriter itemcharStream = new StringWriter(); PrinterWriter itemsOSS = new PrintWriter(itemcharStream); System.out.printIn(''Enter items (type Exit to open):''); useritem = scnr.next(); while (!userItems.Equals(''Exit'')) { /*Your solution goes here*/ UserItem = scnr.nxt(); } useritem = itemCharStream.toString() System.out.printin(useritem); return; } }
Answer:
O D. Allowing sensory play with no objective measurement
Answer:
True
Explanation:
While programming in most programming languages, one will have need to use functions and variables defined in other class libraries. in C++, these functions and variables' definitions are contained in Header files, which can be imported and used into any C++ program by using the pre-processor #include statement. This statement is the equivalent of import in java and copy in other languages. Popular header files are the Maths class (Allows use of maths functions like power, square roots exponentiation etc), the input/output (allows usage of cout print statement and cin input statement)