Click here to Skip to main content
15,888,733 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Real time drawing using multithreading Pin
David Crow14-Sep-15 4:12
David Crow14-Sep-15 4:12 
GeneralRe: Real time drawing using multithreading Pin
FrankStar8914-Sep-15 21:50
FrankStar8914-Sep-15 21:50 
QuestionNeed help with this little C program Pin
Member 1197963712-Sep-15 12:44
Member 1197963712-Sep-15 12:44 
SuggestionRe: Need help with this little C program Pin
Richard MacCutchan12-Sep-15 21:00
mveRichard MacCutchan12-Sep-15 21:00 
AnswerRe: Need help with this little C program Pin
CPallini13-Sep-15 6:52
mveCPallini13-Sep-15 6:52 
GeneralRe: Need help with this little C program Pin
Member 1197963713-Sep-15 8:05
Member 1197963713-Sep-15 8:05 
GeneralRe: Need help with this little C program Pin
CPallini13-Sep-15 10:23
mveCPallini13-Sep-15 10:23 
QuestionRe: Need help with this little C program Pin
Member 1197963713-Sep-15 12:24
Member 1197963713-Sep-15 12:24 
Thanks again, I make improve in the code, but it ain't working as supposed.

I'm really wondering where the code is wrong, I get no output or a wrong output (e.g. 100 100 100 gives as output only 100 a, 0 b, 0 c.)

I tried different things and I guess I'm almost there, but can't fix it.

So please, help me with this code.

Objective-C
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

int main(int argc, char *argv[]) 
{
	int a, b, c, x, y, z; /* x=numbers of a y= numbers of b z= numbers of c*/
	printf("price of a:\n");
  	printf("price of b:\n");
  	printf("price of c:\n");
	scanf("%d, %d, %d" ,&a, &b, &c);

	for(x = 0; x <= 100; x++)
	{
  		for(y = 0; y <= (100 - x); ++y)
  		{
    		        z = 100 - x - y;
    		        if(x*a + y*b + z*c == 10000)
    		        {
        		      printf("%d a, %d b, %d c",x ,y ,z);
    		        }
  		}
	}

return 0;
}

AnswerRe: Need help with this little C program Pin
CPallini13-Sep-15 21:13
mveCPallini13-Sep-15 21:13 
QuestionRe: Need help with this little C program Pin
Member 1197963714-Sep-15 2:42
Member 1197963714-Sep-15 2:42 
AnswerRe: Need help with this little C program Pin
Member 1197963714-Sep-15 2:55
Member 1197963714-Sep-15 2:55 
GeneralRe: Need help with this little C program Pin
CPallini14-Sep-15 3:40
mveCPallini14-Sep-15 3:40 
SuggestionRe: Need help with this little C program Pin
David Crow14-Sep-15 4:40
David Crow14-Sep-15 4:40 
GeneralRe: Need help with this little C program Pin
Member 1197963714-Sep-15 6:10
Member 1197963714-Sep-15 6:10 
QuestionC++ lambda callbacks, how to initialize with NULL pointer ? Pin
Member 853403512-Sep-15 0:45
Member 853403512-Sep-15 0:45 
AnswerRe: C++ lambda callbacks, how to initialize with NULL pointer ? Pin
Richard Andrew x6414-Sep-15 11:36
professionalRichard Andrew x6414-Sep-15 11:36 
GeneralRe: C++ lambda callbacks, how to initialize with NULL pointer ? Pin
Member 853403514-Sep-15 21:42
Member 853403514-Sep-15 21:42 
Questiondata structure and algoritm Pin
Member 1197512010-Sep-15 10:26
Member 1197512010-Sep-15 10:26 
AnswerRe: data structure and algoritm Pin
Afzaal Ahmad Zeeshan10-Sep-15 10:41
professionalAfzaal Ahmad Zeeshan10-Sep-15 10:41 
GeneralRe: data structure and algoritm Pin
Member 1197512010-Sep-15 10:55
Member 1197512010-Sep-15 10:55 
QuestionRe: data structure and algoritm Pin
CPallini10-Sep-15 21:19
mveCPallini10-Sep-15 21:19 
AnswerRe: data structure and algoritm Pin
David Crow11-Sep-15 2:11
David Crow11-Sep-15 2:11 
QuestionRe: data structure and algoritm Pin
CPallini11-Sep-15 2:35
mveCPallini11-Sep-15 2:35 
AnswerRe: data structure and algoritm Pin
jschell11-Sep-15 11:08
jschell11-Sep-15 11:08 
AnswerRe: data structure and algoritm Pin
David Crow11-Sep-15 2:10
David Crow11-Sep-15 2:10 

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.