Question
Develop a C program that reads one integer at a time from a file called numbers.txt and uses a function to check whether the number
Develop a C program that reads one integer at a time from a file called numbers.txt and uses a function to check whether the number is ?oblong.? Your function should return 1 if the number is oblong and 0 otherwise. Your program should print on the screen all numbers that are oblong. A number is called oblong or pronic if it is the product of two consecutive integers. E.g. 30 = 5x6 is an oblong number. Function prototype: int oblong(int x); Sample Output: Input file: 2 9 12 17 25 30 40 72 78 90 Output: The set of oblong numbers is: 2 12 30 72 90
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started