主题:TJU1003(谁有TC3。0的AC程序贴一下)
#include<stdio.h>
void main()
{
char ch;
int i,j,n;
scanf("%d",&n);
ch='A'-1;
for (i=1;i<=n;i++)
{
ch++;
for (j=1;j<=n+i-1;j++)
{
if (j>=n-i+1&&j<=n+i-1) putchar(ch);
else putchar(' ');
}
if (i<n) printf("\n");
}
}
/Main307097.code.c:3: warning: return type of `main' is not `int'
/Main307097.code.c:18:2: warning: no newline at end of file
谁能将就底下这个程序,帮我改下,谢了。我用的事TC 3。0
void main()
{
char ch;
int i,j,n;
scanf("%d",&n);
ch='A'-1;
for (i=1;i<=n;i++)
{
ch++;
for (j=1;j<=n+i-1;j++)
{
if (j>=n-i+1&&j<=n+i-1) putchar(ch);
else putchar(' ');
}
if (i<n) printf("\n");
}
}
/Main307097.code.c:3: warning: return type of `main' is not `int'
/Main307097.code.c:18:2: warning: no newline at end of file
谁能将就底下这个程序,帮我改下,谢了。我用的事TC 3。0