~nhanb/modernc

7954a7dcbc8ffec9e347b85222d0b8d1709cf680 — Nhân 1 year, 3 months ago 52e33b8
run clang-format on getting-started.c too
1 files changed, 11 insertions(+), 14 deletions(-)

M getting-started.c
M getting-started.c => getting-started.c +11 -14
@@ 1,20 1,17 @@
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>

int main(void) {
    double A[5] = {
        [0] = 9.0,
        [1] = 2.9,
        [4] = 3.E+25,
        [3] = .0007,
    };
  double A[5] = {
      [0] = 9.0,
      [1] = 2.9,
      [4] = 3.E+25,
      [3] = .0007,
  };

    for (size_t i = 0; i < 5; ++i) {
        printf("element %zu is %g, \tits square is %g\n",
                i,
                A[i],
                A[i]*A[i]);
    }
  for (size_t i = 0; i < 5; ++i) {
    printf("element %zu is %g, \tits square is %g\n", i, A[i], A[i] * A[i]);
  }

    return EXIT_SUCCESS;
  return EXIT_SUCCESS;
}