November 2013
Beginner
325 pages
9h 47m
English
Back in Xcode, you are going to create another project. First, close the AGoodStart project so that you do not accidentally type new code into the old project.
Now create a new project (File → New → Project...). This project will be a C Command Line Tool named Turkey.
In the project navigator, find this project’s main.c file and open it. Edit main.c so that it matches the following code.
#include <stdio.h>
int main (int argc, const char * argv[])
{
// Declare the variable called 'weight' of type float float weight; // Store a number in that variable weight = 14.2; // Log it to the user printf("The turkey weighs %f.\n", weight); // Declare another variable of type float float cookingTime; // Calculate the cooking ...Read now
Unlock full access