黑马程序员技术交流社区

标题: oc基础。 [打印本页]

作者: 明阳天夏    时间: 2016-1-3 12:38
标题: oc基础。
//整型
    int integerType = 5;
    //浮点型
    float floatType = 3.1415;
    //双浮点型
    double doubleType = 2.2033;
    //短整型
    short int shortType = 200;
    //长整型
    long long int longlongType = 7758123456767L;
    //c语言字符串
    char * cstring = "this is a string!";
   
   
    //整型
    NSLog(@"The value of integerType = %d",integerType);
    //浮点型
    NSLog(@"The value of floatType = %.2f",floatType);
    //双浮点型
    NSLog(@"The value of doubleType = %e",doubleType);
    //短整型
    NSLog(@"The value of shortType = %hi",shortType);
    //长整型
    NSLog(@"The value of longlongType = %lli",longlongType);
    //c语言字符串
    NSLog(@"The value of cstring = %s",cstring);




欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) 黑马程序员IT技术论坛 X3.2