Click here to Skip to main content
15,885,216 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: reverse division to convert decimals to dinary Pin
Omegaclass1-Nov-09 10:10
Omegaclass1-Nov-09 10:10 
GeneralRe: reverse division to convert decimals to dinary Pin
CPallini1-Nov-09 10:13
mveCPallini1-Nov-09 10:13 
GeneralRe: reverse division to convert decimals to dinary Pin
Omegaclass1-Nov-09 12:28
Omegaclass1-Nov-09 12:28 
AnswerRe: reverse division to convert decimals to dinary Pin
David Crow2-Nov-09 4:08
David Crow2-Nov-09 4:08 
GeneralRe: reverse division to convert decimals to dinary Pin
Omegaclass2-Nov-09 17:15
Omegaclass2-Nov-09 17:15 
QuestionRe: reverse division to convert decimals to dinary Pin
David Crow3-Nov-09 2:44
David Crow3-Nov-09 2:44 
AnswerRe: reverse division to convert decimals to dinary Pin
Omegaclass3-Nov-09 19:08
Omegaclass3-Nov-09 19:08 
QuestionUgly Numbers Error Pin
anollipian31-Oct-09 14:21
anollipian31-Oct-09 14:21 
HI
Would U plz help me with this Code
I cant find the Error !!
here's the Question:-http://uva.onlinejudge.org/external/1/136.html[^]
here's the code .. "that shows a wrong output"
#include<iostream>
#include<list>
using namespace std; 
int main ()
{
	int uglylist[1500];
	uglylist[0]=1;
	
	int maximum;
	    int max2=0;
		int max3=0;
		int max5=0;
	for(int i = 1; i<1500; i++)
	{
		maximum =uglylist[i-1];
		
		for(int j=0;j<=i;j++)
		{
			if (uglylist[i]>max2)
			{
				max2=uglylist[j]*2;
				break ; 
			}

			if (uglylist[i]>max3)
			{
				max3=uglylist[j]*3;
				break ; 
			}
			if (uglylist[i]>max5)
			{
				max5=uglylist[j]*5;
				break ; 
			}
			uglylist[i]=min(max2,min(max3,max5));
		}
	}
		cout<<uglylist[1500-1]<<endl;

}

So Would U plz help ?
AnswerRe: Ugly Numbers Error Pin
LunaticFringe31-Oct-09 14:30
LunaticFringe31-Oct-09 14:30 
GeneralRe: Ugly Numbers Error Pin
anollipian31-Oct-09 14:44
anollipian31-Oct-09 14:44 
GeneralRe: Ugly Numbers Error Pin
Luc Pattyn1-Nov-09 3:59
sitebuilderLuc Pattyn1-Nov-09 3:59 
QuestionRe: Ugly Numbers Error Pin
David Crow31-Oct-09 16:26
David Crow31-Oct-09 16:26 
Question2 Errors Pin
MrMcIntyre31-Oct-09 6:09
MrMcIntyre31-Oct-09 6:09 
AnswerRe: 2 Errors Pin
Chris Losinger31-Oct-09 6:10
professionalChris Losinger31-Oct-09 6:10 
AnswerRe: 2 Errors Pin
enhzflep31-Oct-09 6:17
enhzflep31-Oct-09 6:17 
GeneralRe: 2 Errors Pin
MrMcIntyre31-Oct-09 6:25
MrMcIntyre31-Oct-09 6:25 
GeneralRe: 2 Errors Pin
enhzflep31-Oct-09 6:36
enhzflep31-Oct-09 6:36 
GeneralRe: 2 Errors Pin
MrMcIntyre31-Oct-09 6:40
MrMcIntyre31-Oct-09 6:40 
AnswerRe: 2 Errors Pin
David Crow31-Oct-09 16:33
David Crow31-Oct-09 16:33 
QuestionFunctional Parameters Pin
Paul Belikian31-Oct-09 3:59
Paul Belikian31-Oct-09 3:59 
AnswerRe: Functional Parameters Pin
Randor 31-Oct-09 4:08
professional Randor 31-Oct-09 4:08 
GeneralRe: Functional Parameters Pin
Paul Belikian31-Oct-09 4:20
Paul Belikian31-Oct-09 4:20 
AnswerRe: Functional Parameters Pin
Richard MacCutchan31-Oct-09 4:11
mveRichard MacCutchan31-Oct-09 4:11 
GeneralRe: Functional Parameters Pin
Paul Belikian31-Oct-09 4:21
Paul Belikian31-Oct-09 4:21 
QuestionHow to find unallocated sector in a disk programaticaaly Pin
Shiv Murti Pal31-Oct-09 2:24
Shiv Murti Pal31-Oct-09 2:24 

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.