Computer Science, asked by ukey4107, 1 year ago

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 hemanth990810
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