??? ?????????:
# import lt; Foundation/Foundation.h gt; circleArea (float theRadius); rectangleArea (float width, float height); main (int argc, const char * argv [])
{* pool=[[NSAutoreleasePool alloc] init]; pictureWidth;// ?????????? ????? ??????????
float pictureHeight, pictureSurfaceArea,
circleRadius, circleSurfaceArea;// ?????????? ???????????? ??????????
pictureWidth=8;// ????????????????? ?????????? ?????? ???????????
pictureHeight=4.5;// ????????????????? ?????????? ?????? ???????????
circleRadius=5.0;// ????????????????? ?????????? ???????
pictureSurfaceArea=pictureWidth * pictureHeight;// ?????? ??????? ??????????? ????????
circleSurfaceArea=circleArea (circleRadius);
NSLog (@ ??????? ????????:% f. ??????? ??????????: % 10.2f. ,
pictureSurfaceArea, circleSurfaceArea);// ????? ?? ?????
[pool drain]; 0;
} circleArea (float theRadius)//
{
float theArea;// ?????????? ?????????? ??? ???????? ??????????? ????????
theArea=3.14159 * theRadius * theRadius;// S =? R ^ 2
return theArea;// ?????????? ????????? ? ?????????, ?? ???????? ??????? ???? ???????
} rectangleArea (float width, float height)
{
return width * height;
}
????????? ?????? ????????? ???????? ?? ???. 1:
???. 1 ????????? ?????? ?????????
??????????
????, ??????? ???? ??????? ??????? ???????? Mac OS X, ?? ?????????? ???????? ? ???? ??????? ???. ???? ?????????????? ???????, ????? ?????? ?????????? ????? ? ?????? ???? ??? ????? ????????,? Mac OS X? ?????? ????????- ??????????? ????? ??? ???????????????. ?????? ????????? ???????? ???????? Apple (???????? ??????? Mac OS ?? Unix ???????????? ?????? Mac OS X,? ????? ? PowerPC ?? ?????????? ?? Intel) ??????? ? ????????? Macintosh? ????? ???????? ??????. ??? - ?? ???????? «???» ??????, ??? ????? ????? ????? ?????????? ??, ???? - ?? ?????????? Unix ???????????? ???????,? ??? - ?? ?????? ???? ??????? ?????????? ??? ?????????? ???????????? ?????. ??? ????????????? ????????? ???????????? ??? ????? ???? ??????? «???????????» ?? ?????????, ??????????????? ?????? ?? ???????? ?????? ?????, ??????????? ?????????? ??? ??????? ?? ??? ?????? ?? ??????????? Web ?????????. ? ??? ???????? ????????? ??????????? ?????? ???????? ??????????? ?????????? ?? «???» (C Intel ???????????)? ???????? ?????? ???????????? ??????? Microsoft Windows.
?????? ??????????
1. Mac OS - ???????????? ??????? ?? ???????? Apple - URL: # justify gt; ????????? ?? Allbest