Exercise Solution First questions What's output What's input

Slides:



Advertisements
Similar presentations
Looping while … do …. Condition Process 2 Process 1 Y Repeated Loop.
Advertisements

Lab 8 User Defined Function.
COMPSCI 210 Semester Tutorial 3: Latches & Exercises from Ch3.
Function Input and Output Lesson The Magic Box Consider a box that receives numbers in the top And alters them somehow and sends a (usually) different.
Consecutive Integer Problems. What is a consecutive integer? Integer: natural numbers and zero Integer: natural numbers and zero Consecutive: one after.
Introduction to Application Programming IST 256 Application Programming for Information Systems Xiaozhong Liu
CS 112 Intro to Computer Science II Sami Rollins Fall 2006.
11.3 Function Prototypes A Function Prototype contains the function’s return type, name and parameter list Writing the function prototype is “declaring”
Section 4.4: Designing Conditional Functions. REVIEW: Design Recipe – V. 2  Figure out precisely what you need to do. 1. Understand the problem 2. Function.
In Class Exercises. TV  Think about your television as an object.  You send messages to it using the remote control. What messages can you send?  What.
6.1 – Graphing Systems of Equations
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Looping Exercises Deciding Which Loop to Use At this.
Loop Exercise 1 Suppose that you want to take out a loan for $10,000, with 18% APR, and you're willing to make payments of $1,200/month. How long will.
Mastering Char to ASCII AND DOING MORE RELATED STRING MANIPULATION Why VB.Net ?  The Language resembles Pseudocode - good for teaching and learning fundamentals.
Problem Solving with the Sequential Logic Structure Lesson 5 McManusCOP10061.
3.5 – Solving Systems of Equations in Three Variables.
Array Cs212: DataStructures Lab 2. Array Group of contiguous memory locations Each memory location has same name Each memory location has same type a.
Programming Test #1 Solutions. Multiple Choice 1. B) the grammar of the coding language 2. C) String 3. A) Single 4. C) 2Burgers4Me 5. B) Design Time.
Arithmetic Operations. Review function statement input/output comment #include data type variable identifier constant declaration.
Writing JavaScript Functions. Goals By the end of this unit, you should understand … How to breakdown applications into individual, re-usable modules.
Program Design. The design process How do you go about writing a program? –It’s like many other things in life Understand the problem to be solved Develop.
Chapter 3 w Variables, constants, and calculations DIM statements - declaration temporary memory locations identifier, data type, scope data types - values.
AIM: How do we solve systems using substitution? Topic: Solving systems algebraically.
1 Algorithms Practice Topics In-Class Project: Tip Calculator In-Class Project: Drawing a Rectangle.
Programming with LabVIEW Intro to programming and.
 A.4f Apply these skills to solve practical problems.  A.4b Justify steps used in solving equations.  Use a graphing calculator to check your solutions.
Literals A literal (sometimes called a constant) is a symbol which evaluates to itself, i.e., it is what it appears to be. Examples: 5 int literal
Goal: Identify and graph functions..  Relation: mapping or pairing, of input values with output values.  Domain: Set of input values.  Range: set of.
Warm-Up Exercises Warm-up: Countdown to Mastery Week #4 Homework- Page 44 #3-9 all #14-21 all.
Chapter 5 Section 2 The Theory Of Production. Production Functions Figure that shows how total output changes based on the change of a single variable.
Introduction to programming in java Lecture 21 Arrays – Part 1.
Problem Solving and Program Design. Problem Solving Process Define and analyze the problem. Develop a solution. Write down the solution steps in detail.
Repetition statements
Chapter 1 Connections to Algebra Review
CST 1101 Problem Solving Using Computers
CSC111 Quick Revision.
Dice Game Pseudocode Module main() Declare String reply
Review Materials I (T) Subject : T0016 – ALGORITHM AND PROGRAMMING
Introduction to System of Equations and Points of Intersection
3.2 Graphs of Linear Equations in Two Variables
Chapter 2 Assignment and Interactive Input
Systems of Equations Lesson 41: Solve by using a matrix
CSCI 161: Introduction to Programming
By: Muhammad Zidny Naf’an
Leontief Input-Output Model
OUTPUT STATEMENTS GC 201.
INPUT STATEMENTS GC 201.
Review.
OPERATORS (1) CSC 111.
Tutorial 12 – Security Panel Application Introducing the Select Case Multiple-Selection Statement Outline Test-Driving the Security Panel Application.
Use proper case (ie Caps for the beginnings of words)
Function Rules, Tables, and Graphs
SELECTION STATEMENTS (2)
Chapter 8 Arrays Objectives
For Loops.
VB.Net Programming Console Application
Exercise 2 Main Module Declare Integer dollars String message
Bills Exercise Main Module Declare Integer dollars
Algorithms Practice Topics In-Class Project: Tip Calculator
C Security Pre Function
Chapter 8 Arrays Objectives
Process Exchange Transactions Activity
Math log #29 1/30/19 a.
Basic Lessons 5 & 6 Mr. Kalmes.
Basic Mr. Husch.
Module 5 ● Vocabulary 1 a sensing block which will ask whatever question is typed into the block and display an input text box at the bottom.
CS 1111 Introduction to Programming Spring 2019
Figure:
Algorithms, Part 3 of 3 Topics In-Class Project: Tip Calculator
Exceptions Review Checked Vs. Unchecked Exceptions
Presentation transcript:

Exercise Solution First questions What's output What's input 2/22/2019 Exercise Solution First questions What's output Results message What's input Dollar amount What variables are needed Two variables to hold the input and output Main Module Declare Integer dollars Declare String message End Module

Ex Sol What's first thing pgm must do? Then? Get Input Check if its 0 2/22/2019 What's first thing pgm must do? Get Input Then? Check if its 0 Figure out the bills Main Module Declare Integer dollars Declare String message Display “What is the dollar amount?” Input dollars While (dollars != 0) do the calculation End While End Module

EX Sol Then? Show the result Get a new amount Main Module 2/22/2019 Then? Show the result Get a new amount Main Module Declare Integer dollars Declare String message Display “What is the dollar amount?” Input dollars While (dollars != 0) do the calculation and create message Display message End While End Module