I am trying to run c in xcode 6,however I run the ⌘R it shows build Succeeded but nothing in console,but I can run it in ubuntu Linux's gcc,here is my c code in ubuntu Linux
#include <stdio.h>
int main()
{
int a[100],i,j,t,n;
scanf("%d",&n);
for(i=1;i<=n;i++)
scanf("%d",&a[i]);
for(i=1;i<=n-1;i++)
{
for(j=1;j<=n-i;j++)
{
if(a[j]<a[j+1])
{ t=a[j]; a[j]=a[j+1]; a[j+1]=t; }
}
}
for(i=1;i<=n;i++)
printf("%d ",a[i]);
getchar();getchar();
return 0;
}
when I run it in gcc it's ok,
ubuntu#vi ac9.c
ubuntu#gcc -o ac9 ac9.c
ubuntu#./ac9
the file name is ac9.c
but move it to mac's xcode ,I run the ⌘R it shows build Succeeded but nothing in console, and here is my code in xcode 6.4