In article <47***********@mindspring.com>,
pete <pf*****@mindspring.comwrote:
>santosh wrote:
>>
In article <11**********************@z24g2000prh.googlegroups .com>,
beginers of c <ss*******@gmail.comwrote on Wednesday 14 Nov 2007 9:48
pm:
And also my numbers should not be larger than 9.so for each number
the condition has to be checked if it's great than 9 , then the pgm
should return 0.
>This statement:
"when 3 is entered the condition should be checked,if it's
correct then i should be allowed to enter the next number."
Why is that statement written as though
we don't know whether or not entering 3 satisfies that condition?
What condition are we talking about?
The condition of not being greater than 9?
see i have to get numbers in this manner
3 4 5 6 7 8 9
ok.And also my numbers should not be larger than 9.so for each number
the condition has to be checked if it's great than 9 , then the pgm
should return 0.
for above pgm
when 3 is entered the condition should be checked,if it's
correct then i should be allowed to enter the next number.
If the numbers are supposed to be entered on a single line, as
showin "in this manner", then to "be allowed to enter the next number"
implies that after number greater than 9 is found, that the
user should not be "allowed" to enter further numbers on the same line.
That implies examining the input as it is typed, not just when the
line is completed. Unfortunately for the original poster, examining
input as it is typed in is not something that can be done with the
facilities provided by the C I/O library, and requires system-specific
extensions.
--
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth