write a program to input the values of a and b and print the cube of their sum and cube of their product
Answers
Answered by
2
#include<stdio.h>
void main()
{
int a,b,c,d;
printf("Enter two numbers :");
scanf("%d%d", &a,&b);
c = a + b;
d = a * b;
printf("%d", c * c * c);
printf("%d", d * d * d);
getch();
}
Output:
Enter numbers: 2 3
125
216.
Hope this helps!
void main()
{
int a,b,c,d;
printf("Enter two numbers :");
scanf("%d%d", &a,&b);
c = a + b;
d = a * b;
printf("%d", c * c * c);
printf("%d", d * d * d);
getch();
}
Output:
Enter numbers: 2 3
125
216.
Hope this helps!
siddhartharao77:
:-)
Similar questions