Advertisement
smeacham

Multiplication Table

Nov 6th, 2012
378
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.54 KB | None | 0 0
  1. //
  2. //  main.m
  3. //  Multiplication Table
  4. //
  5. //  Created by Steve on 11/6/12.
  6. //  Copyright (c) 2012 Personal. All rights reserved.
  7. //
  8.  
  9. #import <Foundation/Foundation.h>
  10.  
  11. int main(int argc, const char * argv[])
  12. {
  13.     int x = 0;
  14.     int y = 0;
  15.    
  16.     // Produce each row of the table.
  17.     while (y <= 12) {
  18.         x = 0;
  19.  
  20.         // Produce each cell/column in each row.
  21.         while (x <= 12) {
  22.             printf("%d ", x*y);
  23.             x++;
  24.         }
  25.        
  26.         printf("\n");
  27.         y++;
  28.     }
  29.    
  30.     return 0;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement