iOS Development

Course No. 10-152-139

Assignment 16-1

Strings!

  • Create a new Xcode command-line project. Name the project Assignment-16-1.
    • The Type of the project must be Foundation.
  • Write a program that outputs a string that looks like this:
  • The program will start with these variables.
  • The program will end with this output statement.
  • In between the variables and the ouput statement you can only have one for loop with some logic statements inside the loop.
  • You must use the stringWithFormat: method to add the numbers to the outputString. You can’t just type the output string. It must be created in the loop one number at a time.
  • You must be able to change the loopMaximum variable and have the output adjust automatically. For example is the variable is set to 20 you would get this output.
  • NOTE: You can’t have a trailing comma. This is wrong output: