Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. //
  2. // Sqaure lab.m
  3. // UI-Portfolio
  4. //
  5. // Created by Herrick, Benjamin on 11/13/19.
  6. // Copyright © 2019 Herrick, Benjamin. All rights reserved.
  7. //
  8.  
  9. #import <Foundation/Foundation.h>
  10. #include "control.h"
  11. #import "SquareLab.h"
  12.  
  13. @implementation SquareLab
  14. @synthesize length, width, area;
  15.  
  16. - (void)viewDidLoad {
  17. [super viewDidLoad];
  18. [length setText:@"0"];
  19. [width setText:@"0"];
  20. [area setText:@"0"];
  21. }
  22.  
  23. - (IBAction)calculatearea:(id)sender {
  24. double areavalue = areacalc(length.text.doubleValue, width.text.doubleValue);
  25. [area setText:[NSString stringWithFormat:@"%lf", areavalue]];
  26. }
  27. @end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement