Write the code for the program in c language using command line arguments.the program given to me is area of a triangle.
Answers
Answered by
1
#include<stdio.h>
Void main(int argc, char *argv[])
{
int base, height
float=area;
/*argv[0] contains name of the program itself*/
base=atol(argv[1]);//function for converting ascii to long
height=atol(argv[2]);
area=base*height/2;
printf("%f",area) ;
}
Similar questions