A股上市公司传智教育(股票代码 003032)旗下技术交流社区北京昌平校区

 找回密码
 加入黑马

QQ登录

只需一步,快速开始

© 明阳天夏 中级黑马   /  2016-1-3 12:38  /  640 人查看  /  0 人回复  /   0 人收藏 转载请遵从CC协议 禁止商业使用本文

//整型
    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);

0 个回复

您需要登录后才可以回帖 登录 | 加入黑马