Dailyhomework (do as much as you can as often as you can). 1.1) Install the compiler CodeBlocks, or equivalent, on your computer (if you do not have a computer, contact Dr. Lobo immediately by email at nlobo@ucf.edu). Please see the ImmediateHelp Link on the class website, to call for help with the installation procedure. For the installation instructions, go to the class page, read Update 1. If you cannot get the compiler installed on your computer (or if you have Mac) do not worry, we will fix your machine during the next few weeks. In the meantime, you must use an online compiler for C, and test that compiler with the programs that we are giving you. A good online compiler to employ is at https://www.tutorialspoint.com/compile_c_online.php It is simple to use, but requires an internet connection while using it. If you have trouble using it, immediately send email to nlobo@ucf.edu. Another one (which needs you to signup) is www.replit.com/languages/c. 1.2) Download from class website (the Lectures link) the programs: hello.c, feettomile.c Make sure both programs (i.e., hello.c and feettomile.c) run on your computer. When you run each one, it should produce output on the black screen (or maybe white screen on a mac, or on the terminal on Linux, or on your replit screen) 1.3) After you have verified that you can run both programs in 1.2, erase each one, and try to write it yourself without looking at any notes. Get help from the notes to finish each program. Finally, keep repeating 1.3 until you are able to write each program by starting from an empty page and without any help from notes. 1.4) Read Lecture notes, Chapter 2 (the title is Introduction, First Program), skipping the sections called A Brief Intro to Pointers, and Another Method To Visualize Pointers. (You can also skip the section titled "Side Note about Main ...") 1.5) Understand all the four types of variables in Chap 2 (the four are int, float, double, and char). Try writing feettomile.c as floats. Make up additional calculations, such as computing the amount of tax from a six percent sales tax on a ten dollar purchase. Do these (new) programs both ways, first with ints and then with floats. Note that the formats needed for printing them to the screen (with the printf statement) are: %d, %f, %lf and %c for the four types above. Keep in mind that programming is similar to organizing any large operation. When you order a BigMac, the store does not go out and start by killing the cow, harvesting the wheat for the bun, and plucking the vegetables. The store has them all ready to go in proper positions, so that the Sandwich-Artist can easily get the parts needed to finish completing the bun and feed you fast. Getting all the parts ready to finish the job is what programming is. Other example programs to try writing are: 1) compute the area of a rectangle, from its length and width; 2) compute the area of a triangle, from its base and height; 3) compute the total Financial Aid from the two numbers: grants and loans; 4) calculate the sum total of the cost of four textbooks; 5) grandma gave N (like 200) dollars to be divided among Q grandkids, how much will each kid get? 6) compute the Soccer World Cup Year which will be, say, five, World Cups tournaments from now (which you can assume now is 2023). 1.6) Look in "Notes" under "Language Basics Chapter 3"; download the "Notes", the file is titled IO.doc. Skip to the ending sections titled Increment and Decrement Operators, and Other Shorthand Assignments; read them carefully. Make sure you write programs that have statements such as a++; or a += 10; ensure you understand the meanings of these statements. 1.7) Download feettomile2.c, and learn about the use of scanf. For additional programs that you might have written for 1.5 (such as a sales tax program), modify them to read in most of the quantities, and get expertise using the scanf in a variety of situations. 2.1) At this point you need to have been able to run at least three programs, and got the black screens working for them. You need to have understood what integers are, then you should have tried something with floats, doubles, and chars. Ensure that you know that for printing them, you know that you use %d, %f, %lf, and %c respectively. Ensure that you understand how to use Placeholders in the printf statement. Ensure that you understand that in a program, first you write the four-ish lines that you always need, then you put a gap in to write the rest of the code, then in that gap you first declare your variables, and then you do something with them. But, you cannot use a variable on the right-hand-side of an EQUAL sign if you have not yet given it a value. (also, you cannot use it in printf yet till you give it a value). Ensure that you are remembering that a single EQUAL sign means BACKWARDS-ARROW. 2.2) Read the Notes for Chapter 3, IO.pdf. 2.3) Make sure you write programs that have statements such as a++; or a += 10; ensure you understand the meanings of these statements. 2.4) Download feettomile2.c, and learn about the use of scanf. For additional programs that you might have written for 1.5 (such as a sales tax program, or area of a rectangle), modify them to read in most of the quantities, and get expertise using the scanf in a variety of situations. 2.5) Invent other simple mathematical calculations, such as, converting kilograms to pounds; write programs for these cases. 2.6) Download arithmetic.c and grade.c. Run both of them and study them carefully. Ensure you can explain why the outputs turn out to be what they are. 2.7) Ensure that you know that any calculation that is INT DIVIDE BY INT (e.g., 7/2) produces a TRUNCATED result, which is an int (7/2 yields 3). To ensure that you do not truncate (if you do not INTEND to truncate), you can convert one of the values to float or double before the division, so can do: (1.0*7)/2, or 7/(2*1.0), or you can CAST by saying ((float)7)/2. 2.8) Ensure that you understand the percent operator that is used to get the remainder of a calculation. Examine and study the program digits.c. A % B means you must mentally do the steps of taking away as many B's from A to get closer to zero, and then what you are finally left with, is the answer needed. So, (-17) % (4) yields -1. While, (-17) % (-4) also yields -1. 2.9) Ignore this step. 2.10) When writing a program such as area of a rectangle (or, another may be, E = M times cSquared), make sure that we are not tempted to state the equation atop of (at the top of) the lines that give the values for M and c, or, in the rectangle program, the lines that read in length and width. This is simply re-emphasizing the issue in 2.1 above.