Solve of URI 1007 (Difference) in C & C++
Problem Description of URI Online Judge 1007:
Problem name: Difference.
Problem level: 1.
Problem category: Beginner.
Points: 1.4 points
Base time limit: 1 second.
Memory limit: 200 MB.
Problem subject: Sequential.
Problem adapted by: Neilor Tonin (Brazil).
Link: https://www.urionlinejudge.com.br/judge/en/problems/view/1007
Solution language: C & C++
My profile: https://www.urionlinejudge.com.br/judge/en/profile/38770
Solution of URI 1007 in C:
//URI online judge 1007 solution in C
//This solution is made and uploaded by Mehedi Hasan Kajol
#include<stdio.h>
int main(void){
int a,b,c,d;
long int result;
scanf("%d%d%d%d", &a, &b, &c, &d);
result = (a*b) - (c*d);
printf("DIFERENCA = %ld\n", result);
return 0;
}
#include<stdio.h>
int main(void){
int a,b,c,d;
long int result;
scanf("%d%d%d%d", &a, &b, &c, &d);
result = (a*b) - (c*d);
printf("DIFERENCA = %ld\n", result);
return 0;
}
Solution of URI 1007 in C++:
//URI online judge 1007 solution in C++
//This solution is made and uploaded by Mehedi Hasan Kajol
#include <iostream>
using namespace std;
int main() {
int A, B, C, D;
cin >> A >> B >> C >> D;
cout << "DIFERENCA = "<< A*B - C*D << endl;
return 0;
}
#include <iostream>
using namespace std;
int main() {
int A, B, C, D;
cin >> A >> B >> C >> D;
cout << "DIFERENCA = "<< A*B - C*D << endl;
return 0;
}