设为首页 加入收藏

TOP

如何在Xcode里面运行C语言程序---简单展示
2014-11-23 21:53:55 来源: 作者: 【 】 浏览:4
Tags:何在 Xcode 里面 运行 语言程序 --- 简单 展示
如果想要在Xcode运行C程序:
1,选择project的时候,选择OS X中的Application;
2,选择Command Line Tool;点击next
3,在填写options的界面中,有一个type类型,选择里面的C,然后next就好了。
4,就可以在生成的main.c函数中进行C语言编辑
一个简单的测试小示例:
#include
#include
int main(int argc, const char * argv[])
{
int number;
printf("please enter number:");
scanf("%d",&number);
// insert code here...
printf("you are enter number is:%d",number);
return 0;
}
ALL Output:
please enter number:12
you are enter number is:12
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇C语言中常数的数据类型 下一篇C语言算术、赋值、关系、逻辑运算..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: