69,369
社区成员
发帖
与我相关
我的任务
分享
#include<stdio.h>
#include<conio.h>
void code(int number);
int main()
{
int x,y,pass;
for(x=1;x<10;++x)
{
for(pass=1;pass<x;++pass)
printf("\n");
for(y=x;y<10;++y)
{
code(x);
printf("%d*%d=%d\n",y,x,x*y);
}
}
getch();
return 0;
}
void code(int number)
{
--number;
while(number)
printf("\t",--number);
}
#include <windows.h>
#include<stdio.h>
void gotoxy(int x, int y) {
COORD c;
c.X = x - 1;
c.Y = y - 1;
SetConsoleCursorPosition (GetStdHandle(STD_OUTPUT_HANDLE), c);
}
int main()
{
int x,y;
for(x=1;x<10;++x)
{
for(y=x;y<10;++y)
{
gotoxy(8*(x-1),y);
printf("%d*%d=%d\n",y,x,x*y);
}
}
return 0;
}
#include<stdio.h>
#include<conio.h>
int main()
{
int x,y,pass;
for(x=1;x<10;++x)
{
for(y=x;y<10;++y)
{
gotoxy(8*(x-1),y);
printf("%d*%d=%d\n",y,x,x*y);
}
}
getch();
return 0;
}