c programing

PROGRAM TO FIND TOTAL OF THREE NUMBERS

#include<stdio.h>
voidmain()
{
int a,b,c,total;
clrscr();
printf("enter the three numbers");
scanf("%d%d%d",&a&b&c);
total=a+b+c;
printf("total=%d",total);
getch();
}

PROGRAM TO FIND AREA OF A TRIANGLE

#include<stdio.h>
#include<math.h>
void main()
{
float a,b,c,sum,area;
printf("enter the values of area of triangle");
scanf("%f%f%f",&a&b&c);
sum=(a+b+c)/2;
area=sqrt(sum*(a)*(b)*(c));
printf("area of triangle=area");
}
getch()

Comments

Popular posts from this blog