Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
geomatric operations in objective c
//gcc 4.8.4 #import <Foundation/Foundation.h> int main(void) { float side=5; float lenth=5; float width=5; float base=5; float base2=5; float height=5; float radius=5; float edge=5; float a=5; NSLog(@"Perimeter............................."); NSLog(@"Perimeter of square => %f", 4*a); NSLog(@"Perimeter of rectangle => %f \n\n\n", 2*(lenth*base)); NSLog(@"Circumference............................."); NSLog(@"Circumference of circle => %f \n\n\n", 2*3.14*radius); NSLog(@"Surface Areas..............................."); NSLog(@"Surface of cube=> %f", 6*(a*a)); NSLog(@"Surface of cylinder=> %f", 2*3.14*radius*height); NSLog(@"Surface of cone=> %f", 3.14*radius*lenth); NSLog(@"Surface of spahere=> %f \n\n\n", 4*3.14*(radius*radius)); // 2*3.14*r*h 3.14*r*l 4*3.14*r*r NSLog(@"Areas..............................."); NSLog(@"area of square => %f", side*side); NSLog(@"area of rectangle => %f", lenth*width); NSLog(@"area of triangle=> %f", 0.5*base*height); NSLog(@"area of circle => %f", 3.14*radius*radius); NSLog(@"area of Tepezoid=> %f \n\n\n", (base+base2*height/2)); NSLog(@"Volume............................."); NSLog(@"volume of cube=> %f", edge*edge*edge); NSLog(@"volume of cylinder=> %f", 3.14*radius*radius*height); NSLog(@"volume of spahere=> %f", 4*3.14*(radius*radius*radius)/3); }
run
|
edit
|
history
|
help
0
Cylinder And Circle
NSMutableStringProgram
basic arithmatic Opreation in objective C
Goldbach Conjecture
NSNumber
string search
objective c find factorial
find maximum in objective c
linear hybrid cellular automaton reversible random bit generator
Author1