You have unread notifications. Click here.

ATM Dynamic Programming Code

Loading ...
Start Coding
#include <iostream>
#include <vector>
using namespace std;
int vis[1000000][100]={1};
int main() {
-vector<int> x={5,2,1};
-int y = 10;
-for(int j=1; j<=x.size() ; j++)
--for(int i=0; i<=y; i++)
---if(i < x[j-1])
----vis[i][j] = vis[i][j-1];
---else
----vis[i][j] = vis[i][j-1] + vis[i-x[j-1]][j];
-cout<< vis[y][x.size()] <<endl;
}

Exercises

English Version

. A program that  calculates the power using (a base number and an exponent)

Show Advanced Exercises

Advanced Exercises

Questions

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.
Send

Comments & Feedback

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