C program to calculate A+B cube

Code:
#include<stdio.h>
#include<math.h>
void main()
{
int a,b,answer;
printf("\nEnter a A \t:");
scanf("%d",&a);
printf("\nEnter a B \t:");
scanf("%d",&b);
answer=pow(a,3)+pow(b,3)+3*pow(a,2)*b+3*a*pow(b,2);
printf("\n%d is the answer",answer);
}
view raw aplusbcube.c hosted with ❤ by GitHub

Comments

Popular posts from this blog

C++ programming toll plaza simulation program