
Difference
Adapted by Neilor Tonin, URI Brazil
Read four integer values named A, B, C and D. Calculate and print the difference of product A and B by the product of C and D (A * B - C * D).
Input
The input file contains 4 integer values.
Output
Print DIFERENCA (DIFFERENCE in Portuguese) with all the capital letters, according to the following example, with a blank space before and after the equal signal.
Input Samples | Output Samples |
5 |
DIFERENCA = -26 |
0 |
DIFERENCA = -56 |
5 |
DIFERENCA = 86 |
N.B.: It's better if you solve this by your own. Thank you!
URI - BEECROWD Online Judge 1007 Solve in C :
//Solved by Intesar#include <stdio.h>int main() {
int a,b,c,d; scanf("%d%d%d%d",&a,&b,&c,&d); printf("DIFERENCA = %d\n",a*b-c*d);
return 0;}
0 Comments