1. The firstinteger line of the file will be a positive integer, n (less than 10
ID: 3614003 • Letter: 1
Question
1. The firstinteger line of the file will be a positive integer, n(less than 1000), indicating the number of test cases in thefile.
2. The nextn lines will contain a single positive integer each (lessthan 10000), with the number you are to determine is abundant ornot for that test case.
Output Specification
Output a linewith one of the two the following formats for each test case:
Test case #t: Xis abundant.
Test case #t: Xis NOT abundant.
where trepresents the number of the test case (starting with 1), and Xrepresents the number for that case.
Output Sample
Here is onesample output of running the program. Note that this test is NOT acomprehensive test. You should test your program with differentdata than is shown here based on the specifications given. The userinput is given in italics while the program output is inbold.
3
6
12
17
Sample Output (Corresponding toSample Input File)
Test case #1: 6 is NOT abundant.
Test case #2: 12 is abundant.
Test case #3: 17 is NOT abundant.
Explanation / Answer
please rate - thanks #include #include int main() {int count,num,sum,i,j; FILE *Filename; Filename = fopen("numbers.txt","r"); if(Filename == NULL) {printf("Error opening input file! "); return 0; } fscanf(Filename,"%d",&count); for(i=0;iRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.