Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Array program, turbo C.


  • Please log in to reply
1 reply to this topic

#1 rusoman

rusoman

  • Members
  • 14 posts
  • OFFLINE
  •  
  • Local time:06:55 PM

Posted 04 January 2009 - 09:17 AM

The user will input 15 different integer numbers. Your program will find if the input number is already existing or inputted in the array, otherwise your program will ask another value. Then the user will input another number. Your program will find the nearest value/s in the array.

Example:
Input value 1: 13
Input value 2: 18
Input value 3: 9
Input value 4: 1
Input value 5: 0
Input value 6: 15
The number already exists!
Input value 6: 10
Input value 7: 34
Input value 8: 76
Input value 9: 8
Input value 10:100
The number already exists!
Input value 10: 7
Input value 11: 25
Input value 12: 37
Input value 13: 49
Input value 14: 45
Input value 15: 20

Input number to find: 17
Output: 18

Input number to find: 76
Output: The number is existing.

Input number to find: 47
Output:
45, 49

BC AdBot (Login to Remove)

 


#2 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:04:55 AM

Posted 04 January 2009 - 09:45 AM

Did you have a question, because nobody is going to write that for you.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users