Three integers are given in the input- N, A, B. Find an integer C such that N = A + B + C.
Example:
Input: n=10, a=5, b=3
Output: 2
Approach
C++
#include <bits/stdc++.h>using namespace std;int main(){int n = 10, a = 5, b = 3;cout << n - a - b << "\n";return 0;}
No comments:
Post a Comment