Answered step by step
Verified Expert Solution
Question
1 Approved Answer
B. Part 1 Week 2 (1 hour 20 minutes): scanning numbers from an input file 1. Devise a C program that reads an input text
B. Part 1 Week 2 (1 hour 20 minutes): scanning numbers from an input file 1. Devise a C program that reads an input text file, and recognizes the decimal numbers in the file. It ignores the rest of the characters. For each decimal number, it computes the associated value. A decimal number is a sequence of digits (the integer part) followed by an optional decimal part. The decimal part starts with the character '3' (dot) followed by a sequence of'digits. Each number might or might not have a sign ('+' or U). The value of each recognized number is output to an output text file. The sum and average of all number values is also computed and copied to the output file. Examples: 25.05; +567.009; 305.678 Extend the C program to include decimal numbers that also have a positive or negative exponent. Both lower case 'e' and capital 'E' are accepted. Examples: 45.04e2; 5.67e2; 34.5E3; 90.3E09
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