You have unread notifications. Click here.

Math Equation 2

Loading ...
Start Coding
#include <iostream>
#include <vector>
using namespace std;
vector<int> x={7,3,5,4,2};
int y = 15;
int calc (int i, int sum){
-if( i==x.size() )
--return sum==y ;
-return calc(i+1, sum+x[i]) || calc(i+1, sum-x[i]);
int main() {
-cout<< (calc(0,0)?"Yes":"No") <<endl;


English Version


Answer the following questions according to what you learned from the video.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Comments & Feedback

ملحوظة يتم مراجعة التعليقات قبل ظهورها من قبل الإدارة. رجاء عدم كتابة نفس التعليق أكثر من مرة.
Back to Course