wizard    wtorres@uaem.mx Fecha  11/06/2009 00:58 
Host: No mostrado/ Not shown    IP: No mostrado/ Not shown    Sistema: Windows XP


Volver al foro Responder apertura y envio de archivos   Admin: Borrar 	mensaje
 
Mensaje
Publicidad
quisiera saber como le puedo hacer para enviar los datos a un archivo txt ....

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <conio.h>


#define N 5

int matriz [N][N],i,j;

void main()
{

FILE *fp;

int k;
int i;
int j;

clrscr();

fp=fopen("C:\MatrixV.txt","w+");

fprintf(fp,"%d",matriz[N][N]);

srand(time(NULL));

for(i=1;i<=N;i++)
{
printf("\n ");
for(j=1;j<=N;j++)

{
k=(rand()%20)+1;
matriz [j]=k;
printf("%d ",matriz[j]);
}
}

fclose(fp);
getch();
}                                                                                                                                                                                                                                                                                                                                
 

Respuestas (0)
 
  • » apertura y envio de archivos « - wizard - 11/06/2009 00:58


Volver Responder
 
Nombre
E-Mail
Asunto
Web
Enlace a una
imagen

Mensaje