Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
void KirjoitusTiedostoon()
{
  FILE\* fi;
  if ((fi = fopen("a:tiedot.txt","a")) \!=NULL) // tiedoston avaus
  {
   fprintf(fi,"%06s","Minä");
   fprintf(fi," %06s","olen");
   fprintf(fi," %06s"," Teemu ");
   fprintf(fi," %12s"," Tietäväinen ");
   fprintf(fi," %15s\n"," tiedän kaiken");
   fprintf(fi," %15s"," tietokoneista");
   fprintf(fi," %05s"," \!\!\!\!\n");
   fclose(fi);
  }
  else
  {
   printf ("Tiedostoa ei saa avatua ");     printf("\n virhe PAINA ENTER");     scanf("%c",&merkki); }
  }
}

...