You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
368 B

#import <stdio.h>
#import "Fraction.h"
int main(int argc, const char *argv[])
{
// create a new instance
Fraction *frac = [[Fraction alloc] init];
// set the values
[frac setNumerator: 1];
[frac setDenominator: 3];
// print it
printf("The fraction is: ");
[frac print];
printf("\n");
// free memory
[frac release];
return 0;
}