Icons
Questions
Snippets
Write a program to calculate the value of the given expression: (a2-b2). Take the values of a, b as input from the console.
#include<stdio.h>
#include<conio.h>
void main() {
float a,b,total;
printf("Enter the value of a\n");
scanf("%d", &a);
printf("Enter the value of b\n");
scanf("%d", &b);
total = (a+b) * (a-b);
printf("%d", total);
}