This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<stack> | |
using namespace std; | |
bool checkbalance(string expr) | |
{ | |
stack<char> s; | |
char x; | |
for(int i=0;i<expr.length();i++) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
using namespace std; | |
int totalchoc(int money,int price,int wrap) | |
{ | |
if(money < price) | |
{ | |
return 0; | |
} | |
int choc=money/price; | |
choc = choc+(choc-1)/(wrap-1); |