Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
October 19, 2017, 10:55:24 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register Chat  
Pages: [1]   Go Down
  Print  
Author Topic: Chapter 6 - Correction of Exercise 1  (Read 775 times)
microapple
Jr. Member
**
Posts: 83



WWW Email
« on: August 17, 2012, 09:47:46 AM »

Code: (Objective-C)
#import <Foundation/Foundation.h>

int main (int argc, const char * argv[])
{
   
  @autoreleasepool
    {

     
      int a,b;
     
      NSLog(@"Enter the First number : ");
      scanf("%i",&a);
     
      NSLog(@"Enter the Second number : ");
      scanf("%i",&b);
     
        if (a % b == 0)
        {
            NSLog(@" %i is divisible by %i",a,b);
           
        }
        else
        {
            NSLog(@" %i is not divisible by %i ",a,b);
        }
     
       return 0;
 
    }

}
Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Entire forum contents ゥ 2009 classroomM.com. All rights reserved.