Oppgave9.1

Dependencies:   mbed

main.cpp

Committer:
Smashftw
Date:
2017-10-31
Revision:
0:7591d1dbca76

File content as of revision 0:7591d1dbca76:

#include "mbed.h"

DigitalOut Led1(LED1);
LocalFileSystem local("local");
int main()
{
    int i=0, t=0;

    FILE *fp = fopen("/local/fil1.txt", "w");
    if (fp == NULL) {
        Led1 = 1;
        return  1;
    }

    while (i < 100) {
        for(t=0; t<10; t++) {
            fprintf(fp,"%3d", i);
            i++;
        }
        
            fprintf(fp, "\n");
        
    }
    fclose(fp);
    return 0;
    
    
}