ECE 15 Lecture Notes - Lecture 5: Divisor, Regular Expression, Nth Metal
Document Summary
1. factor. c: greatest common divisor, the gcd of two integers m and n denoted gcd(m,n) is the largest integer able to be divided into both, euclidian algorithm, efficiently computes very large numbers, suppose m>n. If n divides m, then clearly gcd(m,n) = n. You want to read their salaries, compute their average, and determine how many salaries are above the average: first, you need to determine the average, then the number of salaries above it. You must go over the salaries, or data, twice, unlike with previous programs. Then sum the values in each element of the arrays, till the sum exceeds n/2 . b. If, for example, the input is 7, then the 7th element in an array will be incremented once. An input n will cause the nth element in an array to increment it by 1: median. c, string arrays, declaration or initialization, with strings of characters, such as ece15 , this is a string of 5 characters.