All pastes #258749 Raw Edit

Mine

public c v1 · immutable
#258749 ·published 2006-11-26 20:35 UTC
rendered paste body
#include <stdio.h>#include <stdlib.h>int main(){   FILE *fp;   float x1, y1, z1;   float x2, y2, z2;   fp = fopen("dianismata.txt", "r");   if (!fp) {      fprintf(stderr, "Error opening file\n");      exit(EXIT_FAILURE);   }   /* Read vectors' coordinates */   fscanf(fp, "%f%f%f", &x1, &y1, &z1);   fscanf(fp, "%f%f%f", &x2, &y2, &z2);	     /* Print vectors' coordinates */   printf("v1(x, y, z) = (%f, %f, %f)\n", x1, y1, z1);	     printf("v2(x, y, z) = (%f, %f, %f)\n", x2, y2, z2);   return EXIT_SUCCESS;}