|
i write this cod in eclipse c\c++ ide but did not work.
#include <stdio.h>
#include <stdlib.h>
int main(void) {
int a=100;
do{
printf("insert a");
scanf("%d",&a);
}while(a<10);
return (0);
}
|
|
|
|
|
What didn't work?
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]
|
|
|
|
|
I just tested it and it works fine.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
sorry you test it in eclipse c\c++ ide?
|
|
|
|
|
Well I see you already got an answer in Q&A. Please do not post questions in more than one forum in future.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
i use eclipse newly but this code did not work in this ide
|
|
|
|
|
Please stop repeating yourself and go and read the information that CPallini provided to resolve this issue.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
i rad it befor and i know that eclips did not show the console.but eclips have console tab and in that tab did not show any thing.
|
|
|
|
|
Go to the eclipse website and ask there.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
This is not a C/C++/MFC question, but an Eclipse question.
Doesn't Eclipse also have an Output tab?
Part of the problem may be that you do not have a \n in the output stream. You might try that and/or calling fflush() after the call to printf() . Calling setbuf() might also be a consideration.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
modified 26-Nov-12 16:52pm.
|
|
|
|
|
no i cant find it if you can pleas say to me
|
|
|
|
|
i ask it in eclipse.org forum and this is the answer:
"
printf("insert a");
fflush(stdout);
scanf("%d",&a);
|
|
|
|
|
What about:
printf("insert a: \n");
scanf("%d", &a);
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
printf("insert a");
fflush(stdout);
scanf("%d",&a);
just this code work.and solve the problem
|
|
|
|