Welcome

>>>Welcome to my "CODE BAZAR"
Code marshal
URI online judge
Others
Code marshal
URI online judge
Others
Code marshal
URI online judge
Others

Update ✔✔✔ Upcoming programming book (.pdf) "Programming Contest (data structures and algorithms) by Md. Mahbub Hasan & "Graph Algorithms" by Safayat Asraf "****** Date: 20 March, 2019****Hazrat Ali****

Thursday, 10 November 2016

URI-1007

URI Online Judge | 1007

Difference

Adapted by Neilor Tonin, URI  Brazil
Timelimit: 1
Problem link click here
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 SamplesOutput Samples
5
6
7
8
DIFERENCA = -26
0
0
7
8
DIFERENCA = -56
5
6
-7
8
DIFERENCA = 86

Solution...

#include<stdio.h>

int main(){
    int a,b,c,d,sum;
    scanf("%d%d%d%d",&a,&b,&c,&d);
    sum=(a*b-c*d);
    printf("DIFERENCA = %d\n",sum);

    return 0;
}


No comments:

Post a Comment