01:198:107 Lecture Notes - Lecture 5: Quadratic Equation, Local Variable

74 views4 pages

Document Summary

Cs 107: lecture 5: focus in means-ends, booleans, ifs. First of all, understand what the program is supposed to return. Understand what the program is supposed to return: the square of its argument. What data it must handle: any real number, x. Find a piece you know how to do. Do it, use variables for data you don"t immediately see how to get. Do what has to go before that piece. Solve these problems one at a time by using the same. Pieces to build with method for each. Find one string in another findstr(string1, string2) To get words from a string findstr( , string) to find spaces. +1 or -1 to get place before or after space. 1 or length(string) to get 1st or last index in string or vector. [str ] to add a space at the end of str. A string, str, forming a single word: only letters, but of any case.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents