⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readfile.c

📁 在C语言环境下编写的利用队列计算向量的+
💻 C
字号:
#include <stdio.h>int main() {	int array[10];	FILE * file;	int i=0, j=0, p=0, m=0;	char  temp;	char mytemp;	file = fopen("test.txt", "r");	while (!feof(file))		{		if ((mytemp= fgetc(file)) != '\n')			{			ungetc(mytemp,file);			fscanf(file, "%d", &array[i]);			i++;			}		}	for (j=0; j<10; j++)	{		printf("%d ", array[j]);	}    fclose(file);	return 0;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -