Newer
Older
/*
* SPDX-FileCopyrightText: 2018 Bruce Cowan <bruce@bcowan.me.uk>
*
#include <stdio.h>
#include <stdlib.h>
#define C 299792458
#define C2 (C)*(C)
int
main (int argc, char **argv)
{
if (argc != 2)
{
printf ("Input the mass in kg: ");
scanf ("%lf", &m);
}
else
{
if (sscanf (argv[1], "%lf", &m) != 1)
{
fprintf (stderr, "Couldn't parse number\n");