Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 2. Thinking in Code: Basic C > Example: ShoppingTrip

2.8. Example: ShoppingTrip

Developers need hardware to do their programming, so let’s write a small C program to calculate the cost of hardware you’ll need to make some great apps. This example will use all of the concepts from the chapter. This may seem like quite a bit of typing, but every time you type a line of code, you’re burning it into your brain.

As before, go into Xcode and choose File New File. In the template window, choose Mac OS X C and C++ C File, then click Next.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial