Free Essay

Problem Definition: Write a Program That Would Calculate and Display the Results for the Multiplication Table for Values Ranging from 1 to 100.

In:

Submitted By 1090
Words 565
Pages 3
CMIS102 Homework Assignment 3

Problem definition: Write a program that would calculate and display the results for the multiplication table for values ranging from 1 to 100.

A. Problem Analysis – Following the directions in the assignment, clearly write up your problem analysis in this section.

In order to write this program, two variables, ROWNUM and COLUMNNUM, will be used with nested repetition loop to complete the necessary calculations. ROWNUM will be used in an outerloop and contain numbers between1-10 and COLUMNNUM will be used in an innerloop and contain numbers between 1-10. For each iteration of the outerloop, the inner loop will be executed 10 times and the product of ROWNUM*COLUMNNUM will produce the multiplication table of ROWNUM. The ROWNUM and COLUMNNUM variables will be incremented by 1in each iteration of loops. The new line will be printed to display the multiplication table for each value of ROWNUM in a separate line.

This table shows the outputs that will be generated from the calculations:

1 2 3 4 5 6 7 8 9 10

2 4 6 8 10 12 14 16 18 20

3 6 9 12 15 18 21 24 27 30

4 8 12 16 20 24 28 32 36 40

5 10 15 20 25 30 35 40 45 50

6 12 18 24 30 36 42 48 54 60

7 14 21 28 35 42 49 56 63 70

8 16 24 32 40 48 56 64 72 80

9 18 27 36 45 54 63 72 81 90

10 20 30 40 50 60 70 80 90 100

B. Program Design – Following the directions in the assignment, clearly write up your problem design in this section and comment your pseudocode.

The program will have two modules, the main module and the calculation module.

Main Module

//Welcome to the Multiplication Display Program

//This program will multiply numbers from 1 to 1000 and display’s them in rows and columns.

Write “Welcome to the Display Calculator”

Write “New Line”

Write “This program will show you the multiplication chart of numbers from 1 to 100.”

Call Calculation Module

End Program

Calculation Module

Declare ROWNUM, COLUMNNUM as Integers

// For each iteration of ROWNUM

For (ROWNUM=1; ROWNUM‹=10;ROWNUM++)

//For each iteration of COLUMNUM

For (COLUMNNUM=1; COLUMNNUM‹=10;COLUMNNUM++)

//Display the calculation

Write ROWNUM*COLUMNNUM+ “ “

End For

//program ends here at the end Calculation Module

End Calculation Module

[pic]

[pic]

C. Program Comments and Test Data – Following the directions in the assignment, include your test data and expected results in this section.

Table 1. Include your test data table here

The program doesn’t require user input. It will be tested here by running it once. The expected output would be the 10 rows and 10 columns.

|Input |Output |
|Nothing |1 2 3 4 5 6 7 8 9 10 |
| |2 4 6 8 10 12 14 16 18 20 |
| |3 6 9 12 15 18 21 24 27 30 |
| |4 8 12 16 20 24 28 32 36 40 |
| |5 10 15 20 25 30 35 40 45 50 |
| |6 12 18 24 30 36 42 48 54 60 |
| |7 14 21 28 35 42 49 56 63 70 |
| |8 16 24 32 40 48 56 64 72 80 |
| |9 18 27 36 45 54 63 72 81 90 |
| |10 20 30 40 50 60 70 80 90 100 |

Similar Documents

Free Essay

Basic Staitics

...1. REVIEW OF BASIC MATHEMATICS 1.0 INTRODUCTION Perhaps twenty years ago the only mathematics a business student was expected to know was a little basic arithmetic. However with the advent and widespread use of computers, it has become possible to process huge quantities of data and to use sophisticated mathematical techniques to solve complex business problems with relative ease. Consequently, it has become expedient to formulate many business problems mathematically and hence business students in our current age are required to attain at least a basic understanding of the various mathematical techniques that are available. The mathematics that is presented in this section is by no means sophisticated. It is meant to serve only as a reminder of basic definitions and techniques learned in secondary school. However because of its very basic nature it is essential that the work presented here be completely mastered if you are to fully understand the work of later sections and later years. Your primary aim for this section is therefore quite simple, to master each of the topics listed in the contents covering the area of number systems, algebra and equation solving. Your guide to a sufficient understanding of these subjects is also simple. If you can correctly solve the problems at the end of each section then you can be fairly confident you have mastered the necessary techniques required for later work. You should attempt all the problems presented unless you...

Words: 12159 - Pages: 49

Premium Essay

Learning C#

...Learning C# 3.0 Other resources from O’Reilly Related titles oreilly.com C# 3.0 Cookbook™ C# 3.0 Design Patterns C# 3.0 in a Nutshell Programming ASP.NET 3.5 Programming C# 3.0 Programming .NET 3.5 Programming WCF Services Programming WPF oreilly.com is more than a complete catalog of O’Reilly books. You’ll also find links to news, events, articles, weblogs, sample chapters, and code examples. oreillynet.com is the essential portal for developers interested in open and emerging technologies, including new platforms, programming languages, and operating systems. Conferences O’Reilly brings diverse innovators together to nurture the ideas that spark revolutionary industries. We specialize in documenting the latest tools and systems, translating the innovator’s knowledge into useful skills for those in the trenches. Visit conferences.oreilly.com for our upcoming events. Safari Bookshelf (safari.oreilly.com) is the premier online reference library for programmers and IT professionals. Conduct searches across more than 1,000 books. Subscribers can zero in on answers to time-critical questions in a matter of seconds. Read the books on your Bookshelf from cover to cover or simply flip to the page you need. Try it today for free. Learning C# 3.0 Jesse Liberty and Brian MacDonald Beijing • Cambridge • Farnham • Köln • Sebastopol • Taipei • Tokyo Learning C# 3.0 by Jesse Liberty and Brian MacDonald Copyright © 2009 Jesse Liberty and...

Words: 62585 - Pages: 251

Free Essay

Arduino

...Edition. Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc. Arduino Cookbook, the image of a toy rabbit, and related trade dress are trademarks of O’Reilly Media, Inc. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O’Reilly Media, Inc., was aware of a trademark claim, the designations have been printed in caps or initial caps. While every precaution has been taken in the preparation of this book, the publisher and authors assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein. ISBN: 978-0-596-80247-9 [LSI] 1299267108 Table of Contents Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ....

Words: 90321 - Pages: 362

Free Essay

Lol Girl

...Blue Pelican Java by Charles E. Cook Version 3.0.5h Copyright © 2004 - 2008 by Charles E. Cook; Refugio, Tx (All rights reserved) 1-1 “Blue Pelican Java,” by Charles E. Cook. ISBN 1-58939-758-4. Published 2005 by Virtualbookworm.com Publishing Inc., P.O. Box 9949, College Station, Tx 77842, US. ©2005, Charles E. Cook. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, recording or otherwise, without the prior written permission of Charles E. Cook. Manufactured in the United States of America. Preface You will find this book to be somewhat unusual. Most computer science texts will begin with a section on the history of computers and then with a flurry of definitions that are just “so many words” to the average student. My approach with Blue Pelican Java is to first give the student some experience upon which to hang the definitions that come later, and consequently, make them more meaningful. This book does have a history section in Appendix S and plenty of definitions later when the student is ready for them. If you will look at Lesson 1, you will see that we go right to work and write a program the very first day. The student will not understand several things about that first program, yet he can immediately make the computer do something useful. This work ethic is typical of the remainder of the book. Rest assured that full understanding...

Words: 31284 - Pages: 126

Premium Essay

Computer

...CHAPTER 1 INTRODUCTION TO INFORMATION TECHNOLOGY 1.1 Introduction Modern civilization has become so complicated and sophisticated that to survive one has to be competitive. This compels people to keep themselves informed of all types of happening in the society. And this in turn entails the need for an infrastructure of information. This is the point where information technology or IT becomes most important, as it is the infrastructure that allows us to get information accurately and in time. Before we define information technology, it is important to understand the notion of Data, Information, Technology, and Knowledge. In everyday conversation, people use the terms data and information interchangeably. However, some computer professional make a distinction between the two terms. Data It is the words, numbers, letters, symbol, sound, video and graphics that describe people, events, things and ideas. It is raw facts about people, objects, and events that have little or no meaning. It is the raw material used to create useful information. It becomes information when you use it as the basis for initiating some action or for making a decision. Information It is defined as the words, numbers, letters, symbol, sound, video and graphics used as the basis for human action or decisions. It is data that have been processed and presented in a form suitable for human interpretation, often with the purpose of revealing trends or patterns that can be used in decision-making. It is data...

Words: 12773 - Pages: 52

Free Essay

Student

...Holcomb Senior Production Project Manager: Marilyn Lloyd Manufacturing Manager: Nick Sklitsis Operations Specialist: Lisa McDowell Cover Designer: Anthony Gemmellaro Text Designer: Gillian Hall Cover Image: Mountain near Pisac, Peru; Photo by author Media Editor: Dan Sandin Full-Service Vendor: Laserwords Project Management: Gillian Hall Printer/Binder: Courier Westford Cover Printer: Lehigh-Phoenix Color This book was composed in InDesign. Basal font is Janson Text. Display font is ITC Franklin Gothic. Copyright © 2012, 2010, 2008, 2006, 2004 by Pearson Education, Inc., publishing as Addison-Wesley. All rights reserved. Manufactured in the United States of America. This publication is protected by Copyright, and permission should be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. To obtain permission(s) to use material from this work, please submit a written...

Words: 142312 - Pages: 570

Premium Essay

Fdi-International Trade

...in TEX ISBN-10: 1-59718-115-3 ISBN-13: 978-1-59718-115-0 This manual is protected by copyright. All rights are reserved. No part of this manual may be reproduced, stored in a retrieval system, or transcribed, in any form or by any means—electronic, mechanical, photocopy, recording, or otherwise—without the prior written permission of StataCorp LP unless permitted subject to the terms and conditions of a license granted to you by StataCorp LP to use the software and documentation. No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted by this document. StataCorp provides this manual “as is” without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. StataCorp may make improvements and/or changes in the product(s) and the program(s) described in this manual at any time and without notice. The software described in this manual is furnished under a license agreement or nondisclosure agreement. The software may be copied only in accordance with the terms of the agreement. It is against the law to copy the software onto DVD, CD, disk, diskette, tape, or any other medium for any purpose other than backup or archival purposes. The automobile dataset appearing on the accompanying media is Copyright c 1979 by Consumers Union of U.S., Inc., Yonkers, NY 10703-1057 and is reproduced by permission from CONSUMER REPORTS...

Words: 66820 - Pages: 268

Free Essay

Concepts of Programming Languages

...Editor: Jeff Holcomb Senior Production Project Manager: Marilyn Lloyd Manufacturing Manager: Nick Sklitsis Operations Specialist: Lisa McDowell Cover Designer: Anthony Gemmellaro Text Designer: Gillian Hall Cover Image: Mountain near Pisac, Peru; Photo by author Media Editor: Dan Sandin Full-Service Vendor: Laserwords Project Management: Gillian Hall Printer/Binder: Courier Westford Cover Printer: Lehigh-Phoenix Color This book was composed in InDesign. Basal font is Janson Text. Display font is ITC Franklin Gothic. Copyright © 2012, 2010, 2008, 2006, 2004 by Pearson Education, Inc., publishing as Addison-Wesley. All rights reserved. Manufactured in the United States of America. This publication is protected by Copyright, and permission should be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. To obtain permission(s) to use material from this work, please submit a written request to Pearson Education,...

Words: 142253 - Pages: 570

Free Essay

Operation Review

...Undergraduate Notes in Mathematics Arkansas Tech University Department of Mathematics A Semester Course in Finite Mathematics for Business and Economics Marcel B. Finan c All Rights Reserved August 10, 2012 1 Contents Preface 4 Mathematics of Finance 1. Simple Interest . . . . . . . . . . . . . . . . . . . . . . . 2. Discrete and Continuous Compound Interest . . . . . . 3. Ordinay Annuity, Future Value and Sinking Fund . . . 4. Present Value of an Ordinay Annuity and Amortization . . . . Matrices and Systems of Linear Equations 5. Solving Linear Systems Using Augmented Matrices . . . . 6. Gauss-Jordan Elimination . . . . . . . . . . . . . . . . . . 7. The Algebra of Matrices . . . . . . . . . . . . . . . . . . 8. Inverse Matrices and their Applications to Linear Systems . . . . . . . . . . . . . . . . . . . . . . . . Linear Programming 9. Solving Systems of Linear Inequalities . . . . . . . . . . . . . . 10. Geometric Method for Solving Linear Programming Problems 11. Simplex Method for Solving Linear Programming Problems . 12. The Dual Problem: Minimization with ≥ Constraints . . . . . Counting Principles, Permuations, and 13. Sets . . . . . . . . . . . . . . . . . . 14. Counting Principles . . . . . . . . . 15. Permutations and Combinations . . . . . . 5 5 12 19 26 . . . . 34 34 42 53 62 . . . . 69 69 77 86 97 Combinations 106 . . . . . . . . . ...

Words: 51131 - Pages: 205

Premium Essay

Computer

...Chapter 1 Structure and Functions of a Computer "Hardware: the parts of a computer that can be kicked." ~ Jeff Pesis After completing this chapter, you will be able to: 1. Explain the importance of computer literacy. 2. Define the term computer. 3. Identify the components of a computer. 4. Compare the uses of various types of: input devices, output devices, and storage devices. 5. Describe categories of computers and their uses. Structure and Functions of a Computer 1 1.0 Introduction A computer is an electronic machine designed for the storage and processing of data. The machinery is called hardware, and this highly sophisticated equipment needs equally sophisticated programs (called software) to become a working computer system. Modern society has come to depend very heavily on the use of computer systems. Banks, businesses, government departments, industries, shops, people at home and school all rely on computer to play a vital role in their daily activities. These activities are centered on information. In business, the computer system has been used a lot and replaced filing cabinets as means of storing information, and clerical workers as a means of processing it. By storing and processing information on a computer system, these businesses can function more quickly and efficiently, because information can be found and collated much faster. Discovery Learning: A computer was also called a data processor. Why? 1.1 Major Parts and Functions A Computer is...

Words: 47755 - Pages: 192

Premium Essay

Computer Science Illuminated

...resources designed to address multiple learning styles and enhance the learning experience. Goin’ Live This step-by-step HTML Tutorial will guide you from start to finish as you create your own website. With each lesson, you’ll gain experience and confidence working in the HTML language. Online Glossary We’ve made all the key terms used in the text easily accessible to you in this searchable online glossary. The Learning Store Jones and Bartlett Publishers has a wealth of material available to supplement the learning and teaching experience. Students and instructors will find additional resources here or at http://computerscience. jbpub.com The Language Library Here you will find two complete chapters that supplement the book’s language-neutral approach to programming concepts. A JAVA language chapter and C++ language chapter are included and follow the same pedagogical approach as the textbook. http://csilluminated.jbpub.com eLearning Our eLearning center provides chapter-specific activities that will actively engage you in the learning process. Each activity directly correlates to material presented in the text to help you gain command over chapter content. Animated Flashcards Computer science is rich with vocabulary, and these virtual flashcards will help you quickly master new terms and definitions. Interactive Review You can check your general...

Words: 67693 - Pages: 271

Free Essay

Business Organization

...Compostela Jichuan Chang Hewlett-Packard Matthew Farrens University of California, Davis David Kaeli Northeastern University Nicole Kaiyan University of Adelaide David Kirk NVIDIA James R. Larus School of Computer and Communications Science at EPFL Jacob Leverich Hewlett-Packard Kevin Lim Hewlett-Packard John Nickolls NVIDIA John Oliver Cal Poly, San Luis Obispo Milos Prvulovic Georgia Tech Partha Ranganathan Hewlett-Packard Table of Contents Cover image Title page In Praise of Computer Organization and Design: The Hardware/Software Interface, Fifth Edition Front-matter Copyright Dedication Acknowledgments Preface About This Book About the Other Book Changes for the Fifth Edition Changes for the Fifth Edition Concluding Remarks Acknowledgments for the Fifth Edition 1. Computer Abstractions and Technology 1.1 Introduction 1.2 Eight Great Ideas in Computer Architecture 1.3 Below Your Program 1.4 Under the Covers 1.5 Technologies for Building Processors and Memory 1.6 Performance 1.7 The Power Wall 1.8 The Sea Change: The Switch from Uniprocessors to Multiprocessors 1.9 Real Stuff: Benchmarking the Intel Core i7 1.10 Fallacies and Pitfalls 1.11 Concluding Remarks 1.12 Historical Perspective and Further Reading 1.13 Exercises 2. Instructions: Language of the Computer 2.1 Introduction 2.2 Operations of the Computer Hardware 2.3 Operands of the Computer Hardware 2.4 Signed and Unsigned Numbers 2.5 Representing Instructions in the Computer 2.6 Logical Operations 2...

Words: 79060 - Pages: 317

Premium Essay

Investment Analysis Workbook

...QUANTITATIVE INVESTMENT ANALYSIS WORKBOOK Second Edition Richard A. DeFusco, CFA Dennis W. McLeavey, CFA Jerald E. Pinto, CFA David E. Runkle, CFA John Wiley & Sons, Inc. QUANTITATIVE INVESTMENT ANALYSIS WORKBOOK CFA Institute is the premier association for investment professionals around the world, with over 85,000 members in 129 countries. Since 1963 the organization has developed and administered the renowned Chartered Financial Analyst Program. With a rich history of leading the investment profession, CFA Institute has set the highest standards in ethics, education, and professional excellence within the global investment community, and is the foremost authority on investment profession conduct and practice. Each book in the CFA Institute Investment Series is geared toward industry practitioners along with graduate-level finance students and covers the most important topics in the industry. The authors of these cutting-edge books are themselves industry professionals and academics and bring their wealth of knowledge and expertise to this series. QUANTITATIVE INVESTMENT ANALYSIS WORKBOOK Second Edition Richard A. DeFusco, CFA Dennis W. McLeavey, CFA Jerald E. Pinto, CFA David E. Runkle, CFA John Wiley & Sons, Inc. Copyright c 2004, 2007 by CFA Institute. All rights reserved. Published by John Wiley & Sons, Inc., Hoboken, New Jersey. Published simultaneously in Canada. No part of this publication may be reproduced, stored in a retrieval system...

Words: 73911 - Pages: 296

Premium Essay

Statistics

...Support/Technology Specialist: Joe Vetere Manufacturing Manager: Evelyn Beaton Senior Manufacturing Buyer: Carol Melville Production Coordination, Technical Illustrations, and Composition: Laserwords Maine Cover Photo Credit: Abstract green flow, ©Oriontrail/Shutterstock Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and Pearson was aware of a trademark claim, the designations have been printed in initial caps or all caps. Library of Congress Cataloging-in-Publication Data Mendenhall, William. A second course in statistics : regression analysis/ William Mendenhall, Terry Sincich –7th ed. p. cm. Includes index. ISBN 0-321-69169-5 1. Commercial statistics. 2. Statistics. 3. Regression analysis. I. Sincich, Terry, II. Title. HF1017.M46 2012 519.5′ 36–dc22 2010000433 Copyright © 2012, 2003, 1996 by Pearson Education, Inc. All rights reserved. No part of this publication may be reproduced, stored in a...

Words: 63698 - Pages: 255

Premium Essay

B2B Advantages and Disadvantages

...Sanatar Permissions Project Manager: Shannon Barbe Media Project Manager, Editorial: Denise Vaughn Media Project Manager, Production: Lisa Rinaldi Supplements Editor: Kelly Loftus Full-Service Project Management: PreMediaGlobal Composition: PreMediaGlobal Printer/Binder: Edwards Brothers Cover Printer: Lehigh-Phoenix Color/Hagerstown Text Font: Palatino Credits and acknowledgments borrowed from other sources and reproduced, with permission, in this textbook appear on appropriate page within text. Microsoft® and Windows® are registered trademarks of the Microsoft Corporation in the U.S.A. and other countries. Screen shots and icons reprinted with permission from the Microsoft Corporation. This book is not sponsored or endorsed by or affiliated with the Microsoft Corporation. Copyright © 2011, 2009, 2007, 2005, 2002 Pearson Education, Inc., publishing as Prentice Hall, One Lake Street, Upper Saddle River, New Jersey 07458. All rights reserved. Manufactured in the United States of America. This publication is protected by Copyright, and permission should be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any form or by any means,...

Words: 193467 - Pages: 774