Home » questions » C prog????????/?
C prog????????/?
. Write a program that accepts any number from the keyboard and tells you whether it is a nonnegative integer. The number should be sent to the function int_test( ), which returns either the integer value, or –1 if the number is negative, or zero if it is nonnegative but not an integer. Inputs should continue until zero is input.
Functions and variables
main( )
input(from keyboard)
integer(return from the function)
int_test( )
value(from main( ) function)
result(value to return)
Output
Your number: 48
The number is 48,
Your number: -14.3
The number is negative
Your number: 12.562
The number is not an integer
Your number: 0

Answers
steekyjim
On 2006-08-14 20:09:01
india_kakinada
On 2006-08-15 04:30:15