what is the problem with this code. i am getting runtime error
#include<iostream>
#include<cstdio>
#define MAX 10001
using namespace std;
int coins[] ={10000,5000,2000,1000,500,200,100,50,20,10,5};
unsigned long numOfChanges[MAX];
int main()
{
int numOfCoins =11;
int chngs=0;
numOfChanges[0 ...
Search found 9 matches
- Thu Aug 31, 2006 1:20 am
- Forum: Volume 1 (100-199)
- Topic: 147 - Dollars
- Replies: 233
- Views: 50874
- Wed Mar 01, 2006 9:23 pm
- Forum: Volume 1 (100-199)
- Topic: 160 - Factors and Factorials
- Replies: 205
- Views: 45142
thanks guru
thank u so much. i was missing a checking condition. now it is accepted
- Tue Feb 28, 2006 8:36 pm
- Forum: Volume 1 (100-199)
- Topic: 160 - Factors and Factorials
- Replies: 205
- Views: 45142
160: giving WA
i am getting WA but unable to sort out where error occurred. plz someone help me out.
#include<stdio.h>
#include<math.h>
int primes[25]={2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97};
int main()
{
int index = -1;
int N,numOfPrime,multipleOfPrime;
int i,k,j;
while ...
#include<stdio.h>
#include<math.h>
int primes[25]={2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97};
int main()
{
int index = -1;
int N,numOfPrime,multipleOfPrime;
int i,k,j;
while ...
- Sun Feb 26, 2006 10:45 pm
- Forum: C++
- Topic: compile error
- Replies: 6
- Views: 1709
thanks
hi,
thank u once again. this was really a silly mistake. i also tried not to use fgets but i could not input string with whitespaces. how can i do that if i want to use cin>> to read string from keyboard?
thank u once again. this was really a silly mistake. i also tried not to use fgets but i could not input string with whitespaces. how can i do that if i want to use cin>> to read string from keyboard?
- Fri Feb 24, 2006 10:15 pm
- Forum: C++
- Topic: compile error
- Replies: 6
- Views: 1709
compile error
i've got compile error. but i cannot detect what the error is can anybody help me with this? thanx in advance.
// codes removed
// codes removed
- Wed Sep 28, 2005 4:29 pm
- Forum: Volume 1 (100-199)
- Topic: 101 - The Blocks Problem
- Replies: 635
- Views: 108633
hi,
thanx for ur reply. i am little busy right now with my academics. that's why, i could not verify ur code. within two or three days u will get some clue of how to resolve the prob. by this time u can try some other problems. i am really really sorry for this inconvenience.....happy programming ...
thanx for ur reply. i am little busy right now with my academics. that's why, i could not verify ur code. within two or three days u will get some clue of how to resolve the prob. by this time u can try some other problems. i am really really sorry for this inconvenience.....happy programming ...
- Tue Sep 27, 2005 4:55 pm
- Forum: Volume 1 (100-199)
- Topic: 101 - The Blocks Problem
- Replies: 635
- Views: 108633
- Sat Sep 24, 2005 7:19 am
- Forum: Volume 4 (400-499)
- Topic: 471 - Magic Numbers
- Replies: 29
- Views: 15854
- Thu Sep 15, 2005 11:47 pm
- Forum: Volume 4 (400-499)
- Topic: 471 - Magic Numbers
- Replies: 29
- Views: 15854
471 compile error
error message generated by online judge is::
-----
03938035_24.c:49: integer constant out of range
03938035_24.c:49: warning: decimal integer constant is so large that it
is unsigned.
---------
guilty line is .------
if(S1>=S1_MAX)
break;
i defined S1_MAX as
#define S1_MAX 9876543210L
i tried ...
-----
03938035_24.c:49: integer constant out of range
03938035_24.c:49: warning: decimal integer constant is so large that it
is unsigned.
---------
guilty line is .------
if(S1>=S1_MAX)
break;
i defined S1_MAX as
#define S1_MAX 9876543210L
i tried ...