Click here to Skip to main content
15,894,405 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionstack and atoi Pin
khomeyni17-Nov-09 9:23
khomeyni17-Nov-09 9:23 
AnswerRe: stack and atoi Pin
«_Superman_»17-Nov-09 9:37
professional«_Superman_»17-Nov-09 9:37 
AnswerRe: stack and atoi Pin
CPallini17-Nov-09 11:41
mveCPallini17-Nov-09 11:41 
GeneralRe: stack and atoi Pin
khomeyni18-Nov-09 0:37
khomeyni18-Nov-09 0:37 
AnswerRe: stack and atoi Pin
David Crow18-Nov-09 3:44
David Crow18-Nov-09 3:44 
QuestionAcroPDF Refresh issue Pin
kasi1417-Nov-09 8:36
kasi1417-Nov-09 8:36 
QuestionIs it possible to split CView window with CSpliterWnd just like frame window? Pin
rambojanggoon17-Nov-09 8:20
rambojanggoon17-Nov-09 8:20 
QuestionCoin Change Problem Error Pin
DaliaMagdy17-Nov-09 4:51
DaliaMagdy17-Nov-09 4:51 
Hi

Hers's the problem :-

file:///C:/Users/dalia/Desktop/5th%20Lab/ACM%20Problems/674%20-%20Coin%20Change_files/674.htm

I tried to answer it but there is an error with Code ..

Would You please tell me what's wrong with it ?
#include<iostream>
using namespace std;
int main()
{  
	freopen("input.txt","r",stdin);
	int n;
	int d[5]={50,25,10,5,1};
	int c[7490];
	int s[7490];
    int count=0;
 
  c[0]=0;s[0]=0;
  c[1]=1;s[1]=1;
  
  for(int j=2;j<7490;j++)
  {  
	  count=0;
  for(int i=0;i<=4;i++)
   {  
     if((j-d[i])>=0)    
	    {
	   c[j]=1+c[j-d[i]];

       count++;
	    }
   }
  s[j]=count;
  }
 while(cin>>n)
 { cout<<s[n]<<endl;}

return 0;
 }


Thanks
AnswerRe: Coin Change Problem Error Pin
mav@octaval17-Nov-09 4:59
mav@octaval17-Nov-09 4:59 
GeneralRe: Coin Change Problem Error Pin
EliottA17-Nov-09 5:27
EliottA17-Nov-09 5:27 
GeneralRe: Coin Change Problem Error Pin
LunaticFringe17-Nov-09 5:31
LunaticFringe17-Nov-09 5:31 
QuestionRe: Coin Change Problem Error Pin
Richard MacCutchan17-Nov-09 5:28
mveRichard MacCutchan17-Nov-09 5:28 
AnswerRe: Coin Change Problem Error Pin
David Crow17-Nov-09 5:51
David Crow17-Nov-09 5:51 
GeneralRe: Coin Change Problem Error Pin
Richard MacCutchan17-Nov-09 6:15
mveRichard MacCutchan17-Nov-09 6:15 
GeneralRe: Coin Change Problem Error Pin
josda100017-Nov-09 5:30
josda100017-Nov-09 5:30 
AnswerRe: Coin Change Problem Error Pin
anollipian17-Nov-09 7:02
anollipian17-Nov-09 7:02 
GeneralRe: Coin Change Problem Error Pin
CPallini17-Nov-09 7:10
mveCPallini17-Nov-09 7:10 
QuestionTransparent lines in C Pin
Rozis17-Nov-09 3:21
Rozis17-Nov-09 3:21 
AnswerRe: Transparent lines in C Pin
Code-o-mat17-Nov-09 3:38
Code-o-mat17-Nov-09 3:38 
GeneralRe: Transparent lines in C Pin
Rozis17-Nov-09 3:56
Rozis17-Nov-09 3:56 
GeneralRe: Transparent lines in C Pin
Code-o-mat17-Nov-09 4:04
Code-o-mat17-Nov-09 4:04 
General[Message Deleted] Pin
KingsGambit17-Nov-09 4:13
KingsGambit17-Nov-09 4:13 
GeneralRe: Transparent lines in C Pin
Code-o-mat17-Nov-09 4:34
Code-o-mat17-Nov-09 4:34 
GeneralRe: Transparent lines in C Pin
Rozis17-Nov-09 5:22
Rozis17-Nov-09 5:22 
GeneralRe: Transparent lines in C Pin
Code-o-mat17-Nov-09 5:35
Code-o-mat17-Nov-09 5:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.