accept command line args
This commit is contained in:
parent
6836cb073a
commit
6de5afde59
1 changed files with 7 additions and 1 deletions
|
@ -2,7 +2,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
|
||||
int main()
|
||||
int main(int num_arg, char** args)
|
||||
{
|
||||
system("clear");
|
||||
printf("\n ~~ Quadratic Calculator ~~\n");
|
||||
|
@ -10,6 +10,12 @@ int main()
|
|||
printf(" ̲-̲b̲±̲√̲b̲̲²̲̲-̲4̲a̲c̲\n");
|
||||
printf(" 2a\n\n");
|
||||
|
||||
printf("there are %d arguments\n", num_arg);
|
||||
|
||||
for(int i=0; i < num_arg; ++i){
|
||||
printf("%s\n", args[i]);
|
||||
};
|
||||
|
||||
double num_A, num_B, num_C;
|
||||
|
||||
printf("Please enter the value for \"a\":\n");
|
||||
|
|
Loading…
Add table
Reference in a new issue