C/C++ Programming for Engineers: Loops Review

Total Page:16

File Type:pdf, Size:1020Kb

C/C++ Programming for Engineers: Loops Review 7/17/2018 C/C++ Programming for Engineers: Loops John T. Bell Department of Computer Science University of Illinois, Chicago Review What would be the best data type to use to record the concentration of a solution in a chemistry laboratory experiment? A. bool B. char C. double D. int E. long int 2 1 7/17/2018 The Power of Loops • Computers are dumb machines, that only do what they are told. • Their power lies in that they follow instructions very quickly, and don’t mind repeating the same instruction millions of times per second. Hence the power of the loop. • The programmers job is then to tell the computer how to loop, when to stop looping, and what to do each pass through the loop. 3 While Loops • The simplest loops to understand are while loops, which continue looping as long as some condition remains true. • The condition is evaluated BEFORE each iteration of the loop, and the loop is executed only if the condition is true. • ( If the condition is initially false, then the loop will execute zero times, i.e. not at all. ) 4 2 7/17/2018 While Loop Syntax while( condition ) { // code in body of loop condition False ? } True body • If braces are omitted, then a Following single statement comprises code the body of the loop. 5 While Example int guess = -1, answer = rand( ) % 10 + 1; Must be initialized to ensure loop entry while( guess != answer ) { cout << “Enter a guess from 1 to 10: “; cin >> guess; } cout << “That’s right! Congratulations!\n”; 6 3 7/17/2018 Looping With a Counter • Although a while loop could be used with a counter to loop a specified number of times, that is not good practice. • The best approach when a loop must execute a specified number of times is with a for loop, which initializes the counter, tests it on each iteration, and ( typically ) increments it on each iteration. 7 For Loop Syntax for( init; condition; incr ) { // code in body of loop init } condition False ? • If braces are omitted, then a True incr body single statement comprises the body of the loop. Following • Note “incr” always happens code after executing the body. 8 4 7/17/2018 The for incrementation component most commonly uses auto-increment: • “i++;”, as a stand-alone statement, is equivalent to “i += 1;” or “i = i + 1;” • “i--;”, as a stand-alone statement, is equivalent to “i -= 1;” or “i = i - 1;” • There is more to auto-increment ( and auto- decrement ), which we cover elsewhere. 9 For Loop Example cout << “ i i^2 i^3” << endl; int i; for( i = 1; i <= 10; i++ ) { cout << i << “ “ << i * i << “ “ << i * i * i; cout << endl; } cout << “After the loop, i = “ << i << endl; 10 5 7/17/2018 What will be printed after the loop ends? for( i = 1; i <= 10; i++ ) { // Assume loop body does not change i } cout << “After the loop, i = “ << i << endl; A. 0 B. 1 C. 10 D. 11 E. Undefined. It may depend on the compiler. 11 Do-While Loops • Do-while loops are nearly identical to whiles. • The condition is evaluated AFTER each iteration of the loop, and the loop is repeated only if the condition is true. • A do-while loop will always execute at least once. After that it functions identically to a while loop. 12 6 7/17/2018 Do-While Loop Syntax do { // code in body of loop body } while( condition ); condition False ? • Note required semi-colon True • If braces are omitted, then a Following single statement comprises code the body of the loop. ( Very rarely omitted. ) 13 Do-While Example int guess, answer = rand( ) % 10 + 1; No initialization needed do { cout << “Enter a guess from 1 to 10: “; cin >> guess; } while( guess != answer ) ; cout << “That’s right! Congratulations!\n”; 14 7 7/17/2018 Break and Continue • “break” causes a loop to finish immediately, continuing execution with the code following the loop body. ( Also used in switches. ) • “continue” causes the current iteration of a loop to finish, starting the next iteration. – While or do-while loops will jump to the evaluation of the loop condition. – For loops will execute the “incrementation”, and then jump to the evaluation of the loop condition. 15 For Loop Flowchart Illustrating break and continue for( init; condition; incr ) { init False // code 1 condition? if( test_C ) code 1 continue; True incr test_C // code 2 if( test_B ) code 2 True break; test_B // code 3 code 3 } Following code 16 8 7/17/2018 Input Checking With a While Loop int age = -1; // Initialized to guarantee loop entry while( age < 0 || age > 120 ) { cout << “Please enter your age: “; cin >> age; if( age < 0 || age > 120 ) cout << age << “ is invalid. Try again.\n”; } // Continue while input is bad 17 Input Checking With a Do-While Loop int age; // No initialization needed do { cout << “Please enter your age: “; cin >> age; if( age < 0 || age > 120 ) cout << age << “ is invalid. Try again.\n”; } while( age < 0 || age > 120 ); //Continue while bad 18 9 7/17/2018 Input Checking With an Infinite Loop int age; // No initialization needed while( true ) { cout << “Please enter your age: “; cin >> age; if( age > 0 && age <= 120 ) // Exit loop if good break; cout << age << “ is invalid. Try again.\n”; } // Loops infinitely while input is bad 19 Review In the following statement, which of the following is the correct order in which the operators will be evaluated? A *= B + C / D – E++; A. *=, +, /, -, ++ B. /, +, -, *=, ++ C. ++, /, +, -, *= D. ++, +, /, -, *= E. None of the above. The correct order of operations is not listed here. 20 10 7/17/2018 When to Use What Kind of Loop • If you can count ( or calculate ) how many times the loop must execute, use a for loop, always with an INTEGER counter. • Else if you need to ensure the loop executes at least once, ( and can’t rig a while to do so ), use a do-while loop. ( A comment at the top of the loop improves readability. ) • Else use a while loop. 21 Review What type of loop is guaranteed to execute at least once, and then continue to repeat until a condition becomes false? A. for B. until C. do until D. while E. do while 22 11 7/17/2018 Nested Loops • The body of a loop can contain any valid code, including other loops, termed nested loops. – The internal loop does not have to be the same type as the enclosing outer loop. – A nested “for” loop is a common way to iterate over two variables and/or produce a table: for( i = 0; i < iMax; i++ ) { for( j = 0; j < jMax; j++ ) cout << i * j << “ “; // Prints numbers on a line cout << endl; // New line when j loop exits. } 23 Empty Loops • Loops can also be empty. – This is very rarely done intentionally. – Comments and braces are needed if this is done on purpose. – Error example: An infinite empty loop: int i = 0; Error here. The “i = i + 1;” is after while( i < 5 ) ; body of the loop the loop, not i = i + 1; is between the inside it, and will closing ) and the ; never be executed. 24 12 7/17/2018 Always Use an INTEGER Loop Counter int i, nLoops; // ( Assume all vars are given values. ) double x, xMin, xMax, delataX; // WRONG: for( x = xMin; x <= xMax; x += deltaX ) { . // RIGHT: for( i = 0; i < nLoops; i++ ) { x = xMin + i * deltaX; . 25 Review What value will be stored by the following C++ code: double answer = 3 + 5 / 2 * 4 / 5.0; A. 0.2 B. 3.2 C. 4.0 D. 4.6 E. 5.0 26 13 7/17/2018 Review Given the following code, what will be stored in k? int i = 5, j = 4, k = 3; k /= i++ % --j; A. 0 B. 1 C. 1.5 D. 3 E. infinity ( divide by zero error. ) 27 Infinite Loop Knock Knock Joke Knock knock Who’s there? Knock Knock who? 28 14.
Recommended publications
  • C++ Programming: Program Design Including Data Structures, Fifth Edition
    C++ Programming: From Problem Analysis to Program Design, Fifth Edition Chapter 5: Control Structures II (Repetition) Objectives In this chapter, you will: • Learn about repetition (looping) control structures • Explore how to construct and use count- controlled, sentinel-controlled, flag- controlled, and EOF-controlled repetition structures • Examine break and continue statements • Discover how to form and use nested control structures C++ Programming: From Problem Analysis to Program Design, Fifth Edition 2 Objectives (cont'd.) • Learn how to avoid bugs by avoiding patches • Learn how to debug loops C++ Programming: From Problem Analysis to Program Design, Fifth Edition 3 Why Is Repetition Needed? • Repetition allows you to efficiently use variables • Can input, add, and average multiple numbers using a limited number of variables • For example, to add five numbers: – Declare a variable for each number, input the numbers and add the variables together – Create a loop that reads a number into a variable and adds it to a variable that contains the sum of the numbers C++ Programming: From Problem Analysis to Program Design, Fifth Edition 4 while Looping (Repetition) Structure • The general form of the while statement is: while is a reserved word • Statement can be simple or compound • Expression acts as a decision maker and is usually a logical expression • Statement is called the body of the loop • The parentheses are part of the syntax C++ Programming: From Problem Analysis to Program Design, Fifth Edition 5 while Looping (Repetition)
    [Show full text]
  • Compiler Construction Assignment 3 – Spring 2018
    Compiler Construction Assignment 3 { Spring 2018 Robert van Engelen µc for the JVM µc (micro-C) is a small C-inspired programming language. In this assignment we will implement a compiler in C++ for µc. The compiler compiles µc programs to java class files for execution with the Java virtual machine. To implement the compiler, we can reuse the same concepts in the code-generation parts that were done in programming assignment 1 and reuse parts of the lexical analyzer you implemented in programming assignment 2. We will implement a new parser based on Yacc/Bison. This new parser utilizes translation schemes defined in Yacc grammars to emit Java bytecode. In the next programming assignment (the last assignment following this assignment) we will further extend the capabilities of our µc compiler by adding static semantics such as data types, apply type checking, and implement scoping rules for functions and blocks. Download Download the Pr3.zip file from http://www.cs.fsu.edu/~engelen/courses/COP5621/Pr3.zip. After unzipping you will get the following files Makefile A makefile bytecode.c The bytecode emitter (same as Pr1) bytecode.h The bytecode definitions (same as Pr1) error.c Error reporter global.h Global definitions init.c Symbol table initialization javaclass.c Java class file operations (same as Pr1) javaclass.h Java class file definitions (same as Pr1) mycc.l *) Lex specification mycc.y *) Yacc specification and main program symbol.c *) Symbol table operations test#.uc A number of µc test programs The files marked ∗) are incomplete. For this assignment you are required to complete these files.
    [Show full text]
  • PDF Python 3
    Python for Everybody Exploring Data Using Python 3 Charles R. Severance 5.7. LOOP PATTERNS 61 In Python terms, the variable friends is a list1 of three strings and the for loop goes through the list and executes the body once for each of the three strings in the list resulting in this output: Happy New Year: Joseph Happy New Year: Glenn Happy New Year: Sally Done! Translating this for loop to English is not as direct as the while, but if you think of friends as a set, it goes like this: “Run the statements in the body of the for loop once for each friend in the set named friends.” Looking at the for loop, for and in are reserved Python keywords, and friend and friends are variables. for friend in friends: print('Happy New Year:', friend) In particular, friend is the iteration variable for the for loop. The variable friend changes for each iteration of the loop and controls when the for loop completes. The iteration variable steps successively through the three strings stored in the friends variable. 5.7 Loop patterns Often we use a for or while loop to go through a list of items or the contents of a file and we are looking for something such as the largest or smallest value of the data we scan through. These loops are generally constructed by: • Initializing one or more variables before the loop starts • Performing some computation on each item in the loop body, possibly chang- ing the variables in the body of the loop • Looking at the resulting variables when the loop completes We will use a list of numbers to demonstrate the concepts and construction of these loop patterns.
    [Show full text]
  • 7. Control Flow First?
    Copyright (C) R.A. van Engelen, FSU Department of Computer Science, 2000-2004 Ordering Program Execution: What is Done 7. Control Flow First? Overview Categories for specifying ordering in programming languages: Expressions 1. Sequencing: the execution of statements and evaluation of Evaluation order expressions is usually in the order in which they appear in a Assignments program text Structured and unstructured flow constructs 2. Selection (or alternation): a run-time condition determines the Goto's choice among two or more statements or expressions Sequencing 3. Iteration: a statement is repeated a number of times or until a Selection run-time condition is met Iteration and iterators 4. Procedural abstraction: subroutines encapsulate collections of Recursion statements and subroutine calls can be treated as single Nondeterminacy statements 5. Recursion: subroutines which call themselves directly or indirectly to solve a problem, where the problem is typically defined in terms of simpler versions of itself 6. Concurrency: two or more program fragments executed in parallel, either on separate processors or interleaved on a single processor Note: Study Chapter 6 of the textbook except Section 7. Nondeterminacy: the execution order among alternative 6.6.2. constructs is deliberately left unspecified, indicating that any alternative will lead to a correct result Expression Syntax Expression Evaluation Ordering: Precedence An expression consists of and Associativity An atomic object, e.g. number or variable The use of infix, prefix, and postfix notation leads to ambiguity An operator applied to a collection of operands (or as to what is an operand of what arguments) which are expressions Fortran example: a+b*c**d**e/f Common syntactic forms for operators: The choice among alternative evaluation orders depends on Function call notation, e.g.
    [Show full text]
  • While Statement in C
    While Statement In C EnricoIs Reg alwaysdisheartening deplete or his novel aspects when chagrined luminesced disputatiously, some crayfishes he orbits clump so temporizingly? grindingly. Solid Ring-necked and comose Bennet Brendan tarnishes never tensehalf-and-half his Stuttgart! while Thank you use a counter is a while loop obscures the condition which is evaluated to embed videos in while c program C while loops statement allows to repeatedly run at same recipient of code until a wrap is met while loop is empty most basic loop in C programming while loop. We then hand this variable c in the statement block and represent your value for each. While adultery in C Set of instructions given coil the compiler to night set of statements until condition becomes false is called loops. If it is negative number added to the condition in c language including but in looping structures, but is executed infinite loop! While Loop Definition Example & Results Video & Lesson. While talking in C Know Program. What is the while eternal in C? A while loop around loop continuously and infinitely until the policy inside the parenthesis becomes false money must guard the. C while and dowhile Loop Programiz. Programming While Loop. The widow while redeem in the C language is basically a post tested loop upon the execution of several parts of the statements can be repeated by reckless use children do-while. 43 Loops Applications in C for Engineering Technology. Do it Loop in C Programming with Examples Phptpoint. Statements and display control C Tutorials Cpluspluscom. Do while just in c example program.
    [Show full text]
  • Repetition Structures
    24785_CH06_BRONSON.qrk 11/10/04 9:05 M Page 301 Repetition Structures 6.1 Introduction Goals 6.2 Do While Loops 6.3 Interactive Do While Loops 6.4 For/Next Loops 6.5 Nested Loops 6.6 Exit-Controlled Loops 6.7 Focus on Program Design and Implementation: After-the- Fact Data Validation and Creating Keyboard Shortcuts 6.8 Knowing About: Programming Costs 6.9 Common Programming Errors and Problems 6.10 Chapter Review 24785_CH06_BRONSON.qrk 11/10/04 9:05 M Page 302 302 | Chapter 6: Repetition Structures The applications examined so far have illustrated the programming concepts involved in input, output, assignment, and selection capabilities. By this time you should have gained enough experience to be comfortable with these concepts and the mechanics of implementing them using Visual Basic. However, many problems require a repetition capability, in which the same calculation or sequence of instructions is repeated, over and over, using different sets of data. Examples of such repetition include continual checking of user data entries until an acceptable entry, such as a valid password, is made; counting and accumulating running totals; and recurring acceptance of input data and recalculation of output values that only stop upon entry of a designated value. This chapter explores the different methods that programmers use to construct repeating sections of code and how they can be implemented in Visual Basic. A repeated procedural section of code is commonly called a loop, because after the last statement in the code is executed, the program branches, or loops back to the first statement and starts another repetition.
    [Show full text]
  • An Introduction to Programming in Simula
    An Introduction to Programming in Simula Rob Pooley This document, including all parts below hyperlinked directly to it, is copyright Rob Pooley ([email protected]). You are free to use it for your own non-commercial purposes, but may not copy it or reproduce all or part of it without including this paragraph. If you wish to use it for gain in any manner, you should contact Rob Pooley for terms appropriate to that use. Teachers in publicly funded schools, universities and colleges are free to use it in their normal teaching. Anyone, including vendors of commercial products, may include links to it in any documentation they distribute, so long as the link is to this page, not any sub-part. This is an .pdf version of the book originally published by Blackwell Scientific Publications. The copyright of that book also belongs to Rob Pooley. REMARK: This document is reassembled from the HTML version found on the web: https://web.archive.org/web/20040919031218/http://www.macs.hw.ac.uk/~rjp/bookhtml/ Oslo 20. March 2018 Øystein Myhre Andersen Table of Contents Chapter 1 - Begin at the beginning Basics Chapter 2 - And end at the end Syntax and semantics of basic elements Chapter 3 - Type cast actors Basic arithmetic and other simple types Chapter 4 - If only Conditional statements Chapter 5 - Would you mind repeating that? Texts and while loops Chapter 6 - Correct Procedures Building blocks Chapter 7 - File FOR future reference Simple input and output using InFile, OutFile and PrintFile Chapter 8 - Item by Item Item oriented reading and writing and for loops Chapter 9 - Classes as Records Chapter 10 - Make me a list Lists 1 - Arrays and simple linked lists Reference comparison Chapter 11 - Like parent like child Sub-classes and complex Boolean expressions Chapter 12 - A Language with Character Character handling, switches and jumps Chapter 13 - Let Us See what We Can See Inspection and Remote Accessing Chapter 14 - Side by Side Coroutines Chapter 15 - File For Immediate Use Direct and Byte Files Chapter 16 - With All My Worldly Goods..
    [Show full text]
  • 6Up with Notes
    Notes CSCE150A Computer Science & Engineering 150A Problem Solving Using Computers Lecture 05 - Loops Stephen Scott (Adapted from Christopher M. Bourke) Fall 2009 1 / 1 [email protected] Chapter 5 CSCE150A 5.1 Repetition in Programs 5.2 Counting Loops and the While Statement 5.3 Computing a Sum or a Product in a Loop 5.4 The for Statement 5.5 Conditional Loops 5.6 Loop Design 5.7 Nested Loops 5.8 Do While Statement and Flag-Controlled Loops 5.10 How to Debug and Test 5.11 Common Programming Errors 2 / 1 Repetition in Programs CSCE150A Just as the ability to make decisions (if-else selection statements) is an important programming tool, so too is the ability to specify the repetition of a group of operations. When solving a general problem, it is sometimes helpful to write a solution to a specific case. Once this is done, ask yourself: Were there any steps that I repeated? If so, which ones? Do I know how many times I will have to repeat the steps? If not, how did I know how long to keep repeating the steps? 3 / 1 Notes Counting Loops CSCE150A A counter-controlled loop (or counting loop) is a loop whose repetition is managed by a loop control variable whose value represents a count. Also called a while loop. 1 Set counter to an initial value of 0 2 while counter < someF inalV alue do 3 Block of program code 4 Increase counter by 1 5 end Algorithm 1: Counter-Controlled Loop 4 / 1 The C While Loop CSCE150A This while loop computes and displays the gross pay for seven employees.
    [Show full text]
  • A Short Introduction to Ocaml
    Ecole´ Polytechnique INF549 A Short Introduction to OCaml Jean-Christophe Filli^atre September 11, 2018 Jean-Christophe Filli^atre A Short Introduction to OCaml INF549 1 / 102 overview lecture Jean-Christophe Filli^atre labs St´ephaneLengrand Monday 17 and Tuesday 18, 9h{12h web site for this course http://www.enseignement.polytechnique.fr/profs/ informatique/Jean-Christophe.Filliatre/INF549/ questions ) [email protected] Jean-Christophe Filli^atre A Short Introduction to OCaml INF549 2 / 102 OCaml OCaml is a general-purpose, strongly typed programming language successor of Caml Light (itself successor of Caml), part of the ML family (SML, F#, etc.) designed and implemented at Inria Rocquencourt by Xavier Leroy and others Some applications: symbolic computation and languages (IBM, Intel, Dassault Syst`emes),static analysis (Microsoft, ENS), file synchronization (Unison), peer-to-peer (MLDonkey), finance (LexiFi, Jane Street Capital), teaching Jean-Christophe Filli^atre A Short Introduction to OCaml INF549 3 / 102 first steps with OCaml Jean-Christophe Filli^atre A Short Introduction to OCaml INF549 4 / 102 the first program hello.ml print_string "hello world!\n" compiling % ocamlopt -o hello hello.ml executing % ./hello hello world! Jean-Christophe Filli^atre A Short Introduction to OCaml INF549 5 / 102 the first program hello.ml print_string "hello world!\n" compiling % ocamlopt -o hello hello.ml executing % ./hello hello world! Jean-Christophe Filli^atre A Short Introduction to OCaml INF549 5 / 102 the first program hello.ml
    [Show full text]
  • Chapter 6 Flow of Control
    Chapter 6 Flow of Control 6.1 INTRODUCTION “Don't you hate code that's In Figure 6.1, we see a bus carrying the children to not properly indented? school. There is only one way to reach the school. The Making it [indenting] part of driver has no choice, but to follow the road one milestone the syntax guarantees that all after another to reach the school. We learnt in Chapter code is properly indented.” 5 that this is the concept of sequence, where Python executes one statement after another from beginning to – G. van Rossum the end of the program. These are the kind of programs we have been writing till now. In this chapter Figure 6.1: Bus carrying students to school » Introduction to Flow of Control Let us consider a program 6-1 that executes in » Selection sequence, that is, statements are executed in an order in which they are written. » Indentation The order of execution of the statements in a program » Repetition is known as flow of control. The flow of control can be » Break and Continue implemented using control structures. Python supports Statements two types of control structures—selection and repetition. » Nested Loops 2021-22 Ch 6.indd 121 08-Apr-19 12:37:51 PM 122 COMPUTER SCIENCE – CLASS XI Program 6-1 Program to print the difference of two numbers. #Program 6-1 #Program to print the difference of two input numbers num1 = int(input("Enter first number: ")) num2 = int(input("Enter second number: ")) diff = num1 - num2 print("The difference of",num1,"and",num2,"is",diff) Output: Enter first number 5 Enter second number 7 The difference of 5 and 7 is -2 6.2 SELECTION Now suppose we have `10 to buy a pen.
    [Show full text]
  • While and Do-While Loops
    While and Do-While Loops 15-110 Summer 2010 Margaret Reid-Miller Loops • Within a method, we can alter the flow of control using either conditionals or loops. • The loop statements while, do-while, and for allow us execute a statement(s) over and over. • Like a conditional, a loop is controlled by a boolean expression that determines how many times the statement is executed. E.g., You may want to calculate the interest paid on a mortgage for each year of the loan term. Summer 2010 15-110 (Reid-Miller) The while statement • The form of the while statement is while (<boolean_expression>) <statement> • If boolean_expression evaluates to true, then statement is executed. • Then, the boolean_expression is evaluated again. If it evaluates to true, statement is executed again. • This repetition continues until the boolean_expression evaluates to false. How is the while loop different from the if statement? Summer 2010 15-110 (Reid-Miller) The if Flowchart false boolean_expression true statement (body of loop) Summer 2010 15-110 (Reid-Miller) The while Flowchart false boolean_expression true statement (body of loop) Summer 2010 15-110 (Reid-Miller) A Example n = 5 while i output 0 Print n asterisks! i < n ? *! 1 int i = 0; ! i < n ? while (i < n) { ! ! **! System.out.print(“*”);! 2 i < n ? !i++;! ***! }! 3 i < n ? System.out.println();! ****! 4 i < n ? *****! 5 i < n ? ***** Summer 2010 15-110 (Reid-Miller) The Loop Control Variable • The variable i (known as the loop control variable) is used in three ways: it is initialized, tested, and updated.!
    [Show full text]
  • Chapter 5: Conditionals and Loops Lab Exercises
    Chapter 5: Conditionals and Loops Lab Exercises Topics Lab Exercises Boolean expressions PreLab Exercises The if statement Computing a Raise The switch statement A Charge Account Statement Activities at Lake LazyDays Rock, Paper, Scissors Date Validation Conditional Operator Processing Grades The while statement PreLab Exercises Counting and Looping Powers of 2 Factorials A Guessing Game Iterators & Reading Text Files Baseball Statistics The do statement More Guessing Election Day The for statement Finding Maximum and Minimum Values Counting Characters Using the Coin Class Drawing with loops and conditionals A Rainbow Program Determining Event Sources Vote Counter, Revisited Dialog Boxes Modifying EvenOdd.java A Pay Check Program Checkboxes & Radio Buttons Adding Buttons to StyleOptions.java Chapter 5: Conditionals and Loops 65 Prelab Exercises Sections 5.1-5.3 1. Rewrite each condition below in valid Java syntax (give a boolean expression): a. x > y > z b. x and y are both less than 0 c. neither x nor y is less than 0 d. x is equal to y but not equal to z 2. Suppose gpa is a variable containing the grade point average of a student. Suppose the goal of a program is to let a student know if he/she made the Dean's list (the gpa must be 3.5 or above). Write an if... else... statement that prints out the appropriate message (either "Congratulations—you made the Dean's List" or "Sorry you didn't make the Dean's List"). 3. Complete the following program to determine the raise and new salary for an employee by adding if ..
    [Show full text]