c语言实现久久乘法表
时间: 2023-07-13 18:18:55 浏览: 101
c语言乘法表实现
Flight flights[100];
int count = 0;
while (fscanf(fp, "%d %s %s %f %以下是 C 语言实现久久乘法表的代码:
```
#include <stdio.h>
int main() {
intd", &flights[count].flight_num, flights[count].departure, flights[count].destination, &flights[count].price, &fl i, j;
for(i=1; i<=9; i++) {
for(j=1; j<=i; j++)ights[count].seats) != EOF) {
count++;
}
for (int i = 0; i < count; {
printf("%d*%d=%-2d ", j, i, i*j); // 使用%-2d实现左 i++) {
if (flights[i].flight_num == flight_num) {
printf("航班编号:%d,出发地对齐
}
printf("\n");
}
return 0;
}
```
输出结果为:
```
1*1:%s,目的地:%s,价格:%.2f,座位数:%d\n", flights[i].flight_num, flights=1
1*2=2 2*2=4
1*3=3 2*3=6 [i].departure, flights[i].destination, flights[i].price, flights[i].seats);
break;
}
}
}
`` 3*3=9
1*4=4 2*4=8 3*4=12 4*`
上述代码仅为示例代码,具体的实现方式还需要根据实际需求进行修改。希望能帮到您!
阅读全文